【发布时间】:2021-02-05 10:17:16
【问题描述】:
我的代码:
@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”对象没有属性 '提及'
【问题讨论】:
-
ctx.guild.owner是 None 所以你不能得到mention属性
标签: python discord discord.py