diff options
author | 2022-02-19 20:34:46 +0200 | |
---|---|---|
committer | 2022-02-19 20:34:46 +0200 | |
commit | 31b3543e78f38bbd393af97590090cfab638043e (patch) | |
tree | 505c8303a6327aa76c854474708983eafdcfa52b /bot/exts/utilities/epoch.py | |
parent | add comments and docstrings, remove an unused variable (diff) | |
parent | Add topics for `#programming-pedagogy` channel (diff) |
Merge branch 'main' into feat/latex
Diffstat (limited to 'bot/exts/utilities/epoch.py')
-rw-r--r-- | bot/exts/utilities/epoch.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/utilities/epoch.py b/bot/exts/utilities/epoch.py index 03758af0..42312dd1 100644 --- a/bot/exts/utilities/epoch.py +++ b/bot/exts/utilities/epoch.py @@ -86,7 +86,10 @@ class Epoch(commands.Cog): view = TimestampMenuView(ctx, self._format_dates(date_time), epoch) original = await ctx.send(f"`{epoch}`", view=view) await view.wait() # wait until expiration before removing the dropdown - await original.edit(view=None) + try: + await original.edit(view=None) + except discord.NotFound: # disregard the error message if the message is deleled + pass @staticmethod def _format_dates(date: arrow.Arrow) -> list[str]: |