0
当我检查的事件像on_message(message)
,每一个命令停止工作活动/命令不工作
如果我删除的情况下,一切都恢复正常。
使用此代码,命令不起作用。
@bot.event
async def on_ready():
print("Connected.")
@bot.event
async def on_message(message):
print("test")
@bot.command(pass_context=True)
async def hello(ctx):
print("test")
删除事件部分时,该命令正常工作。
在定义ON_MESSAGE你忘了下划线明确调用命令。 – Rob
我刚写了一段类似的代码,无论如何它没有解决我的问题 – Francesco