diff options
| author | 2018-10-14 22:15:38 +0100 | |
|---|---|---|
| committer | 2018-10-14 22:15:38 +0100 | |
| commit | 477bb2e0130401d52ed01bdb797c75347e0b186e (patch) | |
| tree | 97acb71c1911ac524021fffb8246f227c460af44 /bot/cogs | |
| parent | Ignore that last commit lol (diff) | |
I believe this fixes the flake8 issues
Diffstat (limited to 'bot/cogs')
| -rw-r--r-- | bot/cogs/error_handler.py | 14 | 
1 files changed, 5 insertions, 9 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py index 268ed35a..72ce5f59 100644 --- a/bot/cogs/error_handler.py +++ b/bot/cogs/error_handler.py @@ -1,6 +1,4 @@ -import discord
  from discord.ext import commands
 -import asyncio
  import sys
  import traceback
  import math
 @@ -9,6 +7,7 @@ import math  class CommandErrorHandler:
      def __init__(self, bot):
          self.bot = bot
 +
      async def on_command_error(self, ctx, error):
          if hasattr(ctx.command, 'on_error'):
              return
 @@ -23,19 +22,16 @@ class CommandErrorHandler:          if isinstance(error, commands.CommandOnCooldown):
              return await ctx.send(
                  "This command is on cooldown," +
 -                "please retry in {}s.".format(math.ceil(error.retry_after))
 +                " please retry in {}s.".format(math.ceil(error.retry_after))
              )
          if isinstance(error, commands.DisabledCommand):
              return await ctx.send(
                  ":no_entry: This command has been disabled."
              )
          if isinstance(error, commands.NoPrivateMessage):
 -            try:
 -                return await ctx.author.send(
 -                    ":no_entry: This command can only be used inside a server."
 -                )
 -            except:
 -                pass
 +            return await ctx.author.send(
 +                ":no_entry: This command can only be used inside a server."
 +            )
          if isinstance(error, commands.BadArgument):
              if ctx.command.qualified_name == 'tag list':
                  return await ctx.send(
  |