我有一个 Discord bot 和一个用于 Discord 频道的 webhook 设置,可以每小时在点上发送一个命令。然而,默认情况下,Discord Rewrite 似乎忽略了从其他机器人发送的命令。我该如何禁用此功能?
我是否需要修改 per-command 函数或 on_message 函数上的某些内容?
当前消息
@bot.event
async def on_message(message):
await bot.process_commands(message)
Run Code Online (Sandbox Code Playgroud)
编辑:找到解决方案
@bot.event
async def on_message(message):
ctx = await bot.get_context(message)
await bot.invoke(ctx)
Run Code Online (Sandbox Code Playgroud)