aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-04-06 02:06:07 +0200
committerGravatar Numerlor <[email protected]>2020-04-09 20:24:40 +0200
commitacee84d044c65b9a8d6ab4a164d189fa0eaa174a (patch)
treee002c8da4a777eb018f4652edf3d9884d8c395c5
parentExtend docstrings to include new behaviour. (diff)
Handle dormant invokation not being found.
-rw-r--r--bot/cogs/help_channels.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 912ce4f44..bc973cd4d 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -5,6 +5,7 @@ import logging
import random
import typing as t
from collections import deque
+from contextlib import suppress
from datetime import datetime
from pathlib import Path
@@ -211,7 +212,9 @@ class HelpChannels(Scheduler, commands.Cog):
if await self.dormant_check(ctx):
self.cancel_task(ctx.channel.id)
await self.move_to_dormant(ctx.channel)
- await ctx.message.delete()
+ with suppress(discord.errors.NotFound):
+ await ctx.message.delete()
+ log.trace("Deleting dormant invokation message.")
await self.reset_send_permissions_for_help_user(ctx.channel)
else:
log.debug(f"{ctx.author} invoked command 'dormant' outside an in-use help channel")