aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-05-31 11:59:44 +0300
committerGravatar ks129 <[email protected]>2020-05-31 11:59:44 +0300
commit0007fb7e50f273108e70bcafbd736bfc75ce3e51 (patch)
tree605ea0fa78b93f58de4ebc0dbcd62cdaa6bfed6d
parentSource: Add command and cog prefixes to title of embed (diff)
Source: In converter move cog checking before command
-rw-r--r--bot/cogs/source.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/cogs/source.py b/bot/cogs/source.py
index 9e6109ca2..a5f90e490 100644
--- a/bot/cogs/source.py
+++ b/bot/cogs/source.py
@@ -28,14 +28,14 @@ class SourceConverter(Converter):
else:
return f"/bot/bot/resources/tags/{tag}.md"
- cmd = ctx.bot.get_command(argument)
- if cmd:
- return cmd
-
cog = ctx.bot.get_cog(argument)
if cog:
return cog
+ cmd = ctx.bot.get_command(argument)
+ if cmd:
+ return cmd
+
raise BadArgument(f"Unable to convert `{argument}` to valid command or Cog.")