Discord.py 不一致错误:命令引发异常:NameError:name';消息';未在角色反应中定义

Discord.py 不一致错误:命令引发异常:NameError:name';消息';未在角色反应中定义,discord.py,Discord.py,您好,我的机器人我设置了一个自动角色系统,但当我运行代码时,它对我说: name错误:未定义名称“消息” 你能帮我吗 守则: @client.event _ready()上的异步定义: Channel=client.get_通道('829747866360610843') Text=“Hey Si Tu Veux accepter Au Conversations exclusive Pour Les Mangas group Sur La Réaction错误出现在您的on_ready事件中:

您好,我的机器人我设置了一个自动角色系统,但当我运行代码时,它对我说:

name错误:未定义名称“消息”

你能帮我吗 守则:

@client.event
_ready()上的异步定义:
Channel=client.get_通道('829747866360610843')

Text=“Hey Si Tu Veux accepter Au Conversations exclusive Pour Les Mangas group Sur La Réaction错误出现在您的on_ready事件中:
Moji=wait message.channel.send(channel,Text)
这里没有称为message的变量,我猜您正在尝试将消息发送到之前获得的频道,为此,您应该使用
Moji=wait channel.send(Text)
。 另外:当使用add_reaction时,建议使用消息中的,而不是客户端的:
等待Moji。add_reaction(“谢谢,但他不工作(

错误是
Moji=等待频道。发送(文本)

AttributeError:'NoneType'对象没有属性'send

导入不一致
从discord.ext导入命令
随机输入
从discord导入权限
从色彩、风格
导入异步
token=“token”
client=commands.Bot(command\u prefix=“$”)
@客户端事件
_ready()上的异步定义:
打印(前青色+“”)
RORO是呜呜呜呜呜呜呜呜呜呜
''')
等待客户。改变状态(活动=discord.Game(name=“exploser des planètesála seul force de son coude”))
#潜伏期
@客户端事件
通道上的异步定义创建(通道):
尽管如此:
等待通道发送(随机选择(垃圾邮件))
@client.command()
异步定义ping(ctx):
等待ctx.message.delete()
等待ctx.send('Pong{0}'。格式(round(client.latency,1))+'ms')
@client.command()
异步定义(ctx):
等待ctx.message.delete()
等待ctx发送(“https://tenor.com/8pZh.gif")
@client.command()
异步def goulag(ctx):
等待ctx.message.delete()
等待ctx.send(“https://tenor.com/view/of-to-gulag-gif-19230867")
@client.command()
@commands.has_角色(“Modération”)
异步def kick(ctx,成员:discord.member,*,reason=None):
等待成员。踢(原因=原因)
等待ctx.send(f'{member}a bienétéexclu')
@client.command(pass\u context=True)
异步定义(ctx,*,文本):
message=ctx.message
等待消息。删除()
等待ctx.send(f“{text}”)
@client.command()
异步def反转(ctx):
等待ctx.message.delete()
等待ctx发送(“https://tenor.com/bhXgQ.gif")
@客户端事件
_ready()上的异步定义:
Channel=client.get_通道('829747866360610843')

Text=“Hey Si Tu Veux Accessor Au Conversations Exclusive Pour Les Mangas Group Sur La Réaction此方法已经过时,只是从另一个方法复制过去。请给我们完整的回溯,即使错误是不言自明的。