Add the auto-delete reaction function
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 8s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 8s
This commit is contained in:
parent
835d12c226
commit
0a302a6181
1 changed files with 7 additions and 0 deletions
|
@ -372,6 +372,13 @@ class AutoResponder(commands.Cog):
|
|||
m = await reaction.message.reply(f"[Here's the answer to your question]({url})")
|
||||
await m.edit(suppress=True)
|
||||
self.lmgtfy_cache.append(reaction.message.id)
|
||||
|
||||
if reaction.emoji.name == "\N{wastebasket}":
|
||||
if reaction.message.channel.permissions_for(reaction.message.guild.me).manage_messages:
|
||||
await reaction.message.delete(
|
||||
reason="%s requested deletion of message" % user,
|
||||
delay=0.2
|
||||
)
|
||||
|
||||
@commands.Cog.listener("on_raw_reaction_add")
|
||||
async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent):
|
||||
|
|
Loading…
Reference in a new issue