我想知道如何使用discord.py在服务器中创建一个频道,并在该频道中添加一个人并发送消息。我正在尝试制作一个ModMail bot,如果您想查看,下面是我的代码:
@bot.command()
async def new(ctx,reason):
AuthorID = str(ctx.author.id)
try:
await ctx.send('@Staff <@{AuthorID}'>
await ctx.send("Please leave your question here our support team will be with you soon!")
except commands.MissingRequiredArgument:
await ctx.send('You are missing a required argument `reason`')
如果你认为我不够清楚或发现任何语法/拼写错误(英语不是我的第一语言),请编辑此帖子
您可以使用^{} 创建文本频道,该频道采用} 创建特定于通道的权限
overwrites
参数。然后可以使用^{相关问题 更多 >
编程相关推荐