Printing full traceback for error
This commit is contained in:
parent
359aae4bf2
commit
1c20ef2754
4
bot.py
4
bot.py
|
@ -57,6 +57,10 @@ async def on_command_error(error, ctx):
|
||||||
await bot.send_message(ctx.message.channel, fmt)
|
await bot.send_message(ctx.message.channel, fmt)
|
||||||
elif isinstance(error, commands.CheckFailure):
|
elif isinstance(error, commands.CheckFailure):
|
||||||
fmt = "You can't tell me what to do!"
|
fmt = "You can't tell me what to do!"
|
||||||
|
f = open("/home/phxntx5/public_html/Bonfire/error_log", 'w')
|
||||||
|
print('In {0.command.qualified_name}:'.format(ctx), file=f)
|
||||||
|
traceback.print_tb(error.original.__traceback__, file=f)
|
||||||
|
print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
|
||||||
await bot.send_message(ctx.message.channel, fmt)
|
await bot.send_message(ctx.message.channel, fmt)
|
||||||
#elif isinstance(error, commands.CommandInvokeError):
|
#elif isinstance(error, commands.CommandInvokeError):
|
||||||
#f = open("/home/phxntx5/public_html/Bonfire/error_log", 'w')
|
#f = open("/home/phxntx5/public_html/Bonfire/error_log", 'w')
|
||||||
|
|
|
@ -10,10 +10,6 @@ with open("/home/phxntx5/public_html/Bonfire/config.yml", "r") as f:
|
||||||
|
|
||||||
connection = None
|
connection = None
|
||||||
|
|
||||||
db_default = global_config.get("db_default")
|
|
||||||
db_boops = global_config.get("db_boops")
|
|
||||||
db_perms = global_config.get("db_perms")
|
|
||||||
|
|
||||||
botDescription = global_config.get("description")
|
botDescription = global_config.get("description")
|
||||||
commandPrefix = global_config.get("command_prefix")
|
commandPrefix = global_config.get("command_prefix")
|
||||||
|
|
||||||
|
@ -22,12 +18,6 @@ defaultStatus = global_config.get("default_status", "")
|
||||||
botToken = global_config.get("bot_token", "")
|
botToken = global_config.get("bot_token", "")
|
||||||
ownerID = global_config.get("owner_id", "")
|
ownerID = global_config.get("owner_id", "")
|
||||||
|
|
||||||
modCommands = global_config.get("modCommands", {})
|
|
||||||
adminCommands = global_config.get("adminCommands", {})
|
|
||||||
openCommands = global_config.get("openCommands", {})
|
|
||||||
ownerCommands = global_config.get("ownerCommands", {})
|
|
||||||
voiceCommands = global_config.get("voiceCommands", {})
|
|
||||||
|
|
||||||
|
|
||||||
def getCursor():
|
def getCursor():
|
||||||
global connection
|
global connection
|
||||||
|
|
Loading…
Reference in a new issue