【发布时间】:2021-01-17 15:36:45
【问题描述】:
我希望它在输入后自动删除作者的消息 (*answer84),这是我的代码:
@client.command()
async def on_message(message):
await client.process_commands(message)
if message.content.startswith('*answer84'):
await ctx.message.delete()
由于某种原因,它只是不删除消息,(没有回溯错误消息)任何帮助将不胜感激,谢谢!
【问题讨论】:
-
你需要使用
eventdecorator而不是command装饰器。
标签: python discord discord.py