aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks123 <[email protected]>2020-03-30 09:36:45 +0300
committerGravatar ks123 <[email protected]>2020-03-30 09:36:45 +0300
commitb37f221b9b68efed48409a64a802ea0df009627f (patch)
treeb23e8246bb475b4cc4b6e034e701d89edeb34fb8
parent(Tags): Added helper function `handle_trashcan_react` for tag response deleti... (diff)
(Tags): Added trashcan handling to `!tags get` command.
-rw-r--r--bot/cogs/tags.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py
index 293fa36f6..5dbb75c73 100644
--- a/bot/cogs/tags.py
+++ b/bot/cogs/tags.py
@@ -225,12 +225,14 @@ class Tags(Cog):
"time": time.time(),
"channel": ctx.channel.id
}
- await ctx.send(embed=Embed.from_dict(tag['embed']))
+ msg = await ctx.send(embed=Embed.from_dict(tag['embed']))
+ await self.handle_trashcan_react(ctx, msg)
elif founds and len(tag_name) >= 3:
- await ctx.send(embed=Embed(
+ msg = await ctx.send(embed=Embed(
title='Did you mean ...',
description='\n'.join(tag['title'] for tag in founds[:10])
))
+ await self.handle_trashcan_react(ctx, msg)
else:
tags = self._cache.values()