diff options
| -rw-r--r-- | bot/utils/messages.py | 2 | ||||
| -rw-r--r-- | bot/utils/scheduling.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py index b6f6c1f66..d4a921161 100644 --- a/bot/utils/messages.py +++ b/bot/utils/messages.py @@ -54,7 +54,7 @@ def reaction_check( log.trace(f"Removing reaction {reaction} by {user} on {reaction.message.id}: disallowed user.") scheduling.create_task( reaction.message.remove_reaction(reaction.emoji, user), - HTTPException, # Suppress the HTTPException if adding the reaction fails + suppressed_exceptions=(HTTPException,), name=f"remove_reaction-{reaction}-{reaction.message.id}-{user}" ) return False diff --git a/bot/utils/scheduling.py b/bot/utils/scheduling.py index d3704b7d1..bb83b5c0d 100644 --- a/bot/utils/scheduling.py +++ b/bot/utils/scheduling.py @@ -163,7 +163,8 @@ class Scheduler: def create_task( coro: t.Awaitable, - *suppressed_exceptions: t.Type[Exception], + *, + suppressed_exceptions: tuple[t.Type[Exception]] = (), event_loop: t.Optional[asyncio.AbstractEventLoop] = None, **kwargs, ) -> asyncio.Task: |