aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ToxicKidz <[email protected]>2021-03-11 12:24:49 -0500
committerGravatar ToxicKidz <[email protected]>2021-03-11 12:24:49 -0500
commit1cd9c7a4f74834d799bfc706f5f28cb4147fa0ff (patch)
tree4b54cc75f5ae9059cfd546c3eeb3e75d8cd36def
parentMerge pull request #619 from JagTheFriend/master (diff)
change ctx.send_help to ctx.invoke(help_command)
;
-rw-r--r--bot/exts/christmas/advent_of_code/_cog.py3
-rw-r--r--bot/exts/evergreen/emoji.py3
-rw-r--r--bot/exts/evergreen/game.py3
-rw-r--r--bot/exts/evergreen/minesweeper.py3
-rw-r--r--bot/exts/evergreen/movie.py3
-rw-r--r--bot/exts/evergreen/snakes/_snakes_cog.py3
-rw-r--r--bot/exts/evergreen/space.py3
-rw-r--r--bot/exts/evergreen/status_codes.py3
-rw-r--r--bot/exts/utils/extensions.py12
-rw-r--r--bot/exts/valentines/be_my_valentine.py3
10 files changed, 26 insertions, 13 deletions
diff --git a/bot/exts/christmas/advent_of_code/_cog.py b/bot/exts/christmas/advent_of_code/_cog.py
index 29902306..bf008ee9 100644
--- a/bot/exts/christmas/advent_of_code/_cog.py
+++ b/bot/exts/christmas/advent_of_code/_cog.py
@@ -51,7 +51,8 @@ class AdventOfCode(commands.Cog):
async def adventofcode_group(self, ctx: commands.Context) -> None:
"""All of the Advent of Code commands."""
if not ctx.invoked_subcommand:
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@adventofcode_group.command(
name="subscribe",
diff --git a/bot/exts/evergreen/emoji.py b/bot/exts/evergreen/emoji.py
index 99f71218..40bf83e8 100644
--- a/bot/exts/evergreen/emoji.py
+++ b/bot/exts/evergreen/emoji.py
@@ -75,7 +75,8 @@ class Emojis(commands.Cog):
if emoji is not None:
await ctx.invoke(self.info_command, emoji)
else:
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@emoji_group.command(name="count", aliases=("c",))
async def count_command(self, ctx: commands.Context, *, category_query: str = None) -> None:
diff --git a/bot/exts/evergreen/game.py b/bot/exts/evergreen/game.py
index d37be0e2..d49a8858 100644
--- a/bot/exts/evergreen/game.py
+++ b/bot/exts/evergreen/game.py
@@ -234,7 +234,8 @@ class Games(Cog):
"""
# When user didn't specified genre, send help message
if genre is None:
- await ctx.send_help("games")
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
return
# Capitalize genre for check
diff --git a/bot/exts/evergreen/minesweeper.py b/bot/exts/evergreen/minesweeper.py
index 286ac7a5..06a75c2b 100644
--- a/bot/exts/evergreen/minesweeper.py
+++ b/bot/exts/evergreen/minesweeper.py
@@ -83,7 +83,8 @@ class Minesweeper(commands.Cog):
@commands.group(name='minesweeper', aliases=('ms',), invoke_without_command=True)
async def minesweeper_group(self, ctx: commands.Context) -> None:
"""Commands for Playing Minesweeper."""
- await ctx.send_help(ctx.command)
+ help_command = ctx.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@staticmethod
def get_neighbours(x: int, y: int) -> typing.Generator[typing.Tuple[int, int], None, None]:
diff --git a/bot/exts/evergreen/movie.py b/bot/exts/evergreen/movie.py
index 340a5724..238ab038 100644
--- a/bot/exts/evergreen/movie.py
+++ b/bot/exts/evergreen/movie.py
@@ -73,7 +73,8 @@ class Movie(Cog):
try:
result = await self.get_movies_list(self.http_session, MovieGenres[genre].value, 1)
except KeyError:
- await ctx.send_help('movies')
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
return
# Check if "results" is in result. If not, throw error.
diff --git a/bot/exts/evergreen/snakes/_snakes_cog.py b/bot/exts/evergreen/snakes/_snakes_cog.py
index d5e4f206..819a98b2 100644
--- a/bot/exts/evergreen/snakes/_snakes_cog.py
+++ b/bot/exts/evergreen/snakes/_snakes_cog.py
@@ -440,7 +440,8 @@ class Snakes(Cog):
@group(name='snakes', aliases=('snake',), invoke_without_command=True)
async def snakes_group(self, ctx: Context) -> None:
"""Commands from our first code jam."""
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@bot_has_permissions(manage_messages=True)
@snakes_group.command(name='antidote')
diff --git a/bot/exts/evergreen/space.py b/bot/exts/evergreen/space.py
index bc8e3118..e388e13f 100644
--- a/bot/exts/evergreen/space.py
+++ b/bot/exts/evergreen/space.py
@@ -63,7 +63,8 @@ class Space(Cog):
@group(name="space", invoke_without_command=True)
async def space(self, ctx: Context) -> None:
"""Head command that contains commands about space."""
- await ctx.send_help("space")
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@space.command(name="apod")
async def apod(self, ctx: Context, date: Optional[str] = None) -> None:
diff --git a/bot/exts/evergreen/status_codes.py b/bot/exts/evergreen/status_codes.py
index 874c87eb..d06724eb 100644
--- a/bot/exts/evergreen/status_codes.py
+++ b/bot/exts/evergreen/status_codes.py
@@ -17,7 +17,8 @@ class HTTPStatusCodes(commands.Cog):
async def http_status_group(self, ctx: commands.Context) -> None:
"""Group containing dog and cat http status code commands."""
if not ctx.invoked_subcommand:
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@http_status_group.command(name='cat')
async def http_cat(self, ctx: commands.Context, code: int) -> None:
diff --git a/bot/exts/utils/extensions.py b/bot/exts/utils/extensions.py
index bb22c353..f7ff2396 100644
--- a/bot/exts/utils/extensions.py
+++ b/bot/exts/utils/extensions.py
@@ -77,7 +77,8 @@ class Extensions(commands.Cog):
@group(name="extensions", aliases=("ext", "exts", "c", "cogs"), invoke_without_command=True)
async def extensions_group(self, ctx: Context) -> None:
"""Load, unload, reload, and list loaded extensions."""
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@extensions_group.command(name="load", aliases=("l",))
async def load_command(self, ctx: Context, *extensions: Extension) -> None:
@@ -87,7 +88,8 @@ class Extensions(commands.Cog):
If '\*' or '\*\*' is given as the name, all unloaded extensions will be loaded.
""" # noqa: W605
if not extensions:
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, "extensions", ctx.command.name)
return
if "*" in extensions or "**" in extensions:
@@ -104,7 +106,8 @@ class Extensions(commands.Cog):
If '\*' or '\*\*' is given as the name, all loaded extensions will be unloaded.
""" # noqa: W605
if not extensions:
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, "extensions", ctx.command.name)
return
blacklisted = "\n".join(UNLOAD_BLACKLIST & set(extensions))
@@ -130,7 +133,8 @@ class Extensions(commands.Cog):
If '\*\*' is given as the name, all extensions, including unloaded ones, will be reloaded.
""" # noqa: W605
if not extensions:
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, "extensions", ctx.command.name)
return
if "**" in extensions:
diff --git a/bot/exts/valentines/be_my_valentine.py b/bot/exts/valentines/be_my_valentine.py
index f3392bcb..59bd42d3 100644
--- a/bot/exts/valentines/be_my_valentine.py
+++ b/bot/exts/valentines/be_my_valentine.py
@@ -43,7 +43,8 @@ class BeMyValentine(commands.Cog):
2) use the command \".lovefest unsub\" to get rid of the lovefest role.
"""
if not ctx.invoked_subcommand:
- await ctx.send_help(ctx.command)
+ help_command = self.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.name)
@lovefest_role.command(name="sub")
async def add_role(self, ctx: commands.Context) -> None: