From fbe8e0a5bf4ffb4443a54588b7f55f25306eee6f Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Mon, 12 Apr 2021 21:49:45 +0100 Subject: fix: display help for the correct command when an error occurs in timed --- bot/exts/evergreen/timed.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bot/exts/evergreen/timed.py') diff --git a/bot/exts/evergreen/timed.py b/bot/exts/evergreen/timed.py index 635ccb32..5f177fd6 100644 --- a/bot/exts/evergreen/timed.py +++ b/bot/exts/evergreen/timed.py @@ -21,7 +21,9 @@ class TimedCommands(commands.Cog): """Time the command execution of a command.""" new_ctx = await self.create_execution_context(ctx, command) - if not new_ctx.command: + ctx.subcontext = new_ctx + + if not ctx.subcontext.command: help_command = f"{ctx.prefix}help" error = f"The command you are trying to time doesn't exist. Use `{help_command}` for a list of commands." -- cgit v1.2.3