Python 3.x 我可以撤销on_command discord.py中的命令吗?

Python 3.x 我可以撤销on_command discord.py中的命令吗?,python-3.x,discord.py,Python 3.x,Discord.py,我有功能 async def dedupetwo(self, message): 我正在检查命令是否未被垃圾邮件,所以我通过调用获取消息的历史记录 async for m in message.channel.history(limit=2, before=message.message): lastmsg = m 然后检查命令是否与该通道中的最后一条消息相同 if lastmsg.clean_content == ctx.message.clean_cont

我有功能

async def dedupetwo(self, message):
我正在检查命令是否未被垃圾邮件,所以我通过调用获取消息的历史记录

async for m in message.channel.history(limit=2, before=message.message):
                lastmsg = m
然后检查命令是否与该通道中的最后一条消息相同

if lastmsg.clean_content == ctx.message.clean_content:
我正在尝试在这个阶段撤销该命令的调用,但我找不到任何能够进行该操作的调用。
是否有任何函数可以满足此要求,或者我应该如何实现此要求?

如果
if
语句满足此要求,您可以使用
return
结束函数/命令

如果lastmsg.clean\u content==ctx.message.clean\u content:
返回