diff --git a/bot.py b/bot.py index e700b06..2f63b0c 100644 --- a/bot.py +++ b/bot.py @@ -97,8 +97,12 @@ async def on_message(message): async def on_command_error(error, ctx): if isinstance(error, commands.CommandNotFound): return - if error.original and isinstance(error.original, discord.Forbidden): - return + try: + if isinstance(error.original, discord.Forbidden): + return + except AttributeError: + pass + if isinstance(error, commands.BadArgument): fmt = "Please provide a valid argument to pass to the command: {}".format(error) await bot.send_message(ctx.message.channel, fmt)