我有这个事件来捕捉错误
@bot.event
async def on_command_error(msg,error):
if error.args[0] == 'The check functions for command hi failed.':
await msg.send("{} **is not an NSFW channel**".format(msg.channel.mention))
@commands.is_nsfw()
@bot.command()
async def hi(msg):
msg.send("OK")
当事件捕捉到错误时,它会继续发送相同的消息两次。 例如,它将发送#频道名称不是NSFW频道
我用的是不和谐.py你知道吗
提前谢谢你的帮助
目前没有回答
相关问题 更多 >
编程相关推荐