diff options
| author | 2020-05-17 12:10:56 +0200 | |
|---|---|---|
| committer | 2020-05-17 12:25:48 +0200 | |
| commit | 4e24e9c43a331ebc0f9b598f4de6c45e04216782 (patch) | |
| tree | 2cc2cdeb401b39c618c597c02965fa59473d0d98 /bot/cogs/reminders.py | |
| parent | Merge pull request #519 from mathsman5133/help-refactor (diff) | |
Use `send_help` to invoke command help
After the refactoring of the help command, we need to use the built-in
method of calling the help command: `Context.send_help`. As an argument,
the qualified name (a string containing the full command path, including
parents) of the command can be passed.
Examples:
- await ctx.send_help("reminders edit")
This would send a help embed with information on `!reminders edit` to
the Context.
- await ctx.send_help(ctx.command.qualified_name)
This would extract the qualified name of the command, which is the full
command path, and send a help embed to Context.
- await ctx.send_help()
This will send the main "root" help embed to the Context.
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/reminders.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py index 8b6457cbb..e2289c75d 100644 --- a/bot/cogs/reminders.py +++ b/bot/cogs/reminders.py @@ -281,7 +281,7 @@ class Reminders(Scheduler, Cog): @remind_group.group(name="edit", aliases=("change", "modify"), invoke_without_command=True) async def edit_reminder_group(self, ctx: Context) -> None: """Commands for modifying your current reminders.""" - await ctx.invoke(self.bot.get_command("help"), "reminders", "edit") + await ctx.send_help("reminders edit") @edit_reminder_group.command(name="duration", aliases=("time",)) async def edit_reminder_duration(self, ctx: Context, id_: int, expiration: Duration) -> None: |