aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar vcokltfre <[email protected]>2021-04-11 04:03:59 +0100
committerGravatar vcokltfre <[email protected]>2021-04-11 04:03:59 +0100
commitb0892e5afbbb13167c7c295c8f8241a2146eddf7 (patch)
tree99e8d2459437e92d763d30b19b8060bef391ec5d
parentfix message updating and return types (diff)
return and send message if command isnt found while timing
-rw-r--r--bot/exts/evergreen/timed.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/exts/evergreen/timed.py b/bot/exts/evergreen/timed.py
index 57575993..a0f29838 100644
--- a/bot/exts/evergreen/timed.py
+++ b/bot/exts/evergreen/timed.py
@@ -21,7 +21,11 @@ class TimedCommands(commands.Cog):
"""Time the command execution of a command."""
new_ctx = await self.create_execution_context(ctx, command)
- if new_ctx.command and new_ctx.command.qualified_name == "timed":
+ if not new_ctx.command:
+ await ctx.send("The command you are trying to time doesn't exist. Use `.help` for a list of commands.")
+ return
+
+ if new_ctx.command.qualified_name == "timed":
await ctx.send("You are not allowed to time the execution of the `timed` command.")
return