我的代码:@commands.command(pass_context=True)@commands.guild_only()async def owner_mention(self, ctx): await ctx.send(ctx.guild.owner.mention)错误:Discord.ext.commands.errors.CommandInvokeError:命令引发异常:AttributeError:“NoneType”对象没有属性“提及”
1 回答

胡子哥哥
TA贡献1825条经验 获得超6个赞
在新版本的discord.py(1.5.x)中,Intents
. 意图就像权限。您需要定义它来向频道、成员等发送消息。
import discord intents = discord.Intents().all() client = discord.Bot(prefix='', intents=intents)
添加回答
举报
0/150
提交
取消