From 262f5e7d154f5ca3e01bcf53937c5c1829cdd77c Mon Sep 17 00:00:00 2001 From: bMorgan01 Date: Mon, 29 Nov 2021 15:28:31 -0700 Subject: [PATCH] added exception to attempted server connect --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e28af26..19ee57e 100644 --- a/main.py +++ b/main.py @@ -45,7 +45,8 @@ async def on_command_error(ctx: discord.ext.commands.context.Context, error: dis await safeSend("Command \"" + ctx.message.content.split()[0] + "\" does not exist.", ctx=ctx) elif isinstance(error, discord.ext.commands.MissingPermissions): await safeSend("You are missing " + ", ".join(error.missing_perms) + " permission(s) to run this command.", ctx=ctx) - elif isinstance(error, discord.ext.commands.CommandInvokeError) and "gaierror" in error.__class__.__name__: + elif isinstance(error, discord.ext.commands.CommandInvokeError): + print(error.__class__.__name__) await log(ctx, "Query failed, server down?") else: raise error