diff options
| author | 2021-07-23 16:59:39 +0100 | |
|---|---|---|
| committer | 2021-07-23 16:59:39 +0100 | |
| commit | d5b6f3d934215eceefdb9905e1b39f7c5c2a8a61 (patch) | |
| tree | 1022d2f4b294f896e04209a327bca21b3b4b3294 | |
| parent | Remove extra lines (diff) | |
Delete reaction if error_message not deleted.
| -rw-r--r-- | bot/exts/info/doc/_cog.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/info/doc/_cog.py b/bot/exts/info/doc/_cog.py index 2cac7c10e..c0cb4db29 100644 --- a/bot/exts/info/doc/_cog.py +++ b/bot/exts/info/doc/_cog.py @@ -14,7 +14,7 @@ import discord from discord.ext import commands from bot.bot import Bot -from bot.constants import MODERATION_ROLES, RedirectOutput +from bot.constants import Emojis, MODERATION_ROLES, RedirectOutput from bot.converters import Inventory, PackageName, ValidURL, allowed_strings from bot.pagination import LinePaginator from bot.utils.lock import SharedEvent, lock @@ -342,6 +342,9 @@ class DocCog(commands.Cog): error_message = await send_denial(ctx, "No documentation found for the requested symbol.") await wait_for_deletion(error_message, (ctx.author.id,), timeout=NOT_FOUND_DELETE_DELAY) + with suppress(discord.NotFound): + await message.clear_reaction(Emojis.trashcan) + if not (ctx.message.mentions or ctx.message.role_mentions): with suppress(discord.NotFound): await ctx.message.delete() |