mirror of
https://github.com/UiO-Gaming/ShiteMusicBot.git
synced 2026-11-05 13:56:51 +01:00
Fixed logging of errors
maybe
This commit is contained in:
1 parent
f13a9c574a
commit
529f1fc012
1 file changed
+5
-4
@@ -78,20 +78,21 @@ class Bot(commands.Bot):
|
||||
|
||||
if isinstance(err, commands.CommandInvokeError):
|
||||
self.logger.debug("Error running command: %s\n Traceback: %s"
|
||||
% (ctx.command, traceback.format_exception(err.__traceback__)))
|
||||
% (ctx.command, err))
|
||||
pass
|
||||
|
||||
elif isinstance(err, commands.NoPrivateMessage):
|
||||
self.logger.debug("Error running command: %s\n Traceback: %s"
|
||||
% (ctx.command, traceback.format_exception(err.__traceback__)))
|
||||
% (ctx.command, err))
|
||||
await ctx.send('That command is not available in DMs')
|
||||
|
||||
elif isinstance(err, commands.CommandOnCooldown):
|
||||
await ctx.send(f"{ctx.message.author.mention} Command is on cooldown. Try again in `{err.retry_after:.1f}` seconds.")
|
||||
await ctx.send(f"{ctx.message.author.mention} Command is on cooldown. "
|
||||
f"Try again in `{err.retry_after:.1f}` seconds.")
|
||||
|
||||
elif isinstance(err, commands.CheckFailure):
|
||||
self.logger.debug("Error running command: %s\n Traceback: %s"
|
||||
% (ctx.command, traceback.format_exception(err.__traceback__)))
|
||||
% (ctx.command, err))
|
||||
pass
|
||||
|
||||
elif isinstance(err, commands.CommandNotFound):
|
||||
|
||||
Reference in new issue
Block a user