我一直试图让一个机器人使用discord.py在阅读this(这不是我想要的,因为我没有使用自定义的emojis)之后,使用discord.py添加对消息的响应,但它最终给出了这个错误:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: InvalidArgument: message argument must be a Message
我试过这个密码
@commands.command(pass_context=True)
async def emoji(ctx):
msg = "working"
await bot.say(msg)
reactions = ['dart']
for emoji in reactions: await bot.add_reaction(msg, emoji)
这里关于discord.py的任何其他相关问题对此都没有帮助 关于如何实现这一点的任何想法
错误消息告诉您错误是什么:“
message argument must be a Message
”排队
msg
是字符串,而不是Message
对象。您需要捕获发送的消息,然后将响应添加到该消息:相关问题 更多 >
编程相关推荐