From 15c8d70ea56129fa907ee4f58fbf8aa9e3e7b32a Mon Sep 17 00:00:00 2001 From: HippoProgrammer <172101796+HippoProgrammer@users.noreply.github.com> Date: Wed, 10 Jun 2026 08:45:55 +0000 Subject: [PATCH] Add rudimentary error handling to the bot itself --- src/__main__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/__main__.py b/src/__main__.py index 4bcaf9f..78a13da 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -486,6 +486,11 @@ async def show_sc_queue(ctx: discord.ApplicationContext) -> None: async def announce_sc_queue(ctx: discord.ApplicationContext,ping_users:bool) -> None: await _announce_queue(ctx = ctx, council = 2, ping_users = ping_users) +@bot.event +async def on_application_command_error(ctx:discord.ApplicationContext, error:discord.DiscordException): + logger.error(error) + ctx.respond('<@1271403487045095465> An unspecified error occurred.') + async def main() -> None: try: logger.info('Starting DB setup scripts')