aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/timed.py
diff options
context:
space:
mode:
authorGravatar vcokltfre <[email protected]>2021-04-12 21:49:45 +0100
committerGravatar vcokltfre <[email protected]>2021-04-14 05:22:37 +0100
commitfbe8e0a5bf4ffb4443a54588b7f55f25306eee6f (patch)
treeb455db8577d1746d7623e7b891a8549432246eea /bot/exts/evergreen/timed.py
parentMerge pull request #681 from python-discord/vcokltfre/feat/ping (diff)
fix: display help for the correct command when an error occurs in timed
Diffstat (limited to 'bot/exts/evergreen/timed.py')
-rw-r--r--bot/exts/evergreen/timed.py4
1 files changed, 3 insertions, 1 deletions
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."