diff options
| author | 2021-03-12 20:01:24 -0500 | |
|---|---|---|
| committer | 2021-03-12 20:01:24 -0500 | |
| commit | ccf7d118eb2dea996b10bf0a4cfca977c452f636 (patch) | |
| tree | c5e93c250b8b1a10f915042b5f5a8a284d1f274c /bot | |
| parent | make utility invoke_help_command function (diff) | |
Make flake8 happy.
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/exts/evergreen/game.py | 2 | ||||
| -rw-r--r-- | bot/exts/evergreen/status_codes.py | 1 | ||||
| -rw-r--r-- | bot/exts/utils/extensions.py | 2 | ||||
| -rw-r--r-- | bot/utils/extensions.py | 7 | 
4 files changed, 5 insertions, 7 deletions
| diff --git a/bot/exts/evergreen/game.py b/bot/exts/evergreen/game.py index ab4cae77..a6bfecaa 100644 --- a/bot/exts/evergreen/game.py +++ b/bot/exts/evergreen/game.py @@ -15,8 +15,8 @@ from discord.ext.commands import Cog, Context, group  from bot.bot import Bot  from bot.constants import STAFF_ROLES, Tokens  from bot.utils.decorators import with_role -from bot.utils.pagination import ImagePaginator, LinePaginator  from bot.utils.extensions import invoke_help_command +from bot.utils.pagination import ImagePaginator, LinePaginator  # Base URL of IGDB API  BASE_URL = "https://api.igdb.com/v4" diff --git a/bot/exts/evergreen/status_codes.py b/bot/exts/evergreen/status_codes.py index a037e117..127f3424 100644 --- a/bot/exts/evergreen/status_codes.py +++ b/bot/exts/evergreen/status_codes.py @@ -2,6 +2,7 @@ from http import HTTPStatus  import discord  from discord.ext import commands +  from bot.utils.extensions import invoke_help_command  HTTP_DOG_URL = "https://httpstatusdogs.com/img/{code}.jpg" diff --git a/bot/exts/utils/extensions.py b/bot/exts/utils/extensions.py index 9c126a7b..4bd606b0 100644 --- a/bot/exts/utils/extensions.py +++ b/bot/exts/utils/extensions.py @@ -11,7 +11,7 @@ from bot import exts  from bot.bot import Bot  from bot.constants import Client, Emojis, MODERATION_ROLES, Roles  from bot.utils.checks import with_role_check -from bot.utils.extensions import EXTENSIONS, unqualify, invoke_help_command +from bot.utils.extensions import EXTENSIONS, invoke_help_command, unqualify  from bot.utils.pagination import LinePaginator  log = logging.getLogger(__name__) diff --git a/bot/utils/extensions.py b/bot/utils/extensions.py index 56f6dd00..afc57383 100644 --- a/bot/utils/extensions.py +++ b/bot/utils/extensions.py @@ -1,10 +1,10 @@ +from discord.ext.commands import Context  import importlib  import inspect  import pkgutil  from typing import Iterator, NoReturn  from bot import exts -from discord.ext.commands import Context  def unqualify(name: str) -> str: @@ -33,10 +33,7 @@ def walk_extensions() -> Iterator[str]:  async def invoke_help_command(ctx: Context, *commands: str) -> None: -    """Invoke the help command, and will use the default help command -       if the help exten is not loaded. -    """ - +    """Invoke the help command or default help command if help extensions is not loaded."""      if 'bot.exts.evergreen.help' in ctx.bot.extensions:          help_command = ctx.bot.get_command('help')          await ctx.invoke(help_command, *commands) | 
