added exception to attempted server connect
This commit is contained in:
parent
2d8e8c6b03
commit
262f5e7d15
1 changed files with 2 additions and 1 deletions
3
main.py
3
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)
|
await safeSend("Command \"" + ctx.message.content.split()[0] + "\" does not exist.", ctx=ctx)
|
||||||
elif isinstance(error, discord.ext.commands.MissingPermissions):
|
elif isinstance(error, discord.ext.commands.MissingPermissions):
|
||||||
await safeSend("You are missing " + ", ".join(error.missing_perms) + " permission(s) to run this command.", ctx=ctx)
|
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?")
|
await log(ctx, "Query failed, server down?")
|
||||||
else:
|
else:
|
||||||
raise error
|
raise error
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue