aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ToxicKidz <[email protected]>2021-04-12 11:53:10 -0400
committerGravatar ToxicKidz <[email protected]>2021-04-12 11:53:10 -0400
commitf27ea27c039ff1b28436320c10e3c2fc4f6c06f6 (patch)
treec6cdc91d497b9ea51eae06f3034abf863780fcb5
parentMerge pull request #1516 from ToxicKidz/sorted-available-channels (diff)
Use == instead of str.startswith
-rw-r--r--bot/exts/info/source.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py
index 49e74f204..dc452d21d 100644
--- a/bot/exts/info/source.py
+++ b/bot/exts/info/source.py
@@ -14,9 +14,10 @@ SourceType = Union[commands.HelpCommand, commands.Command, commands.Cog, str, co
class SourceConverter(commands.Converter):
"""Convert an argument into a help command, tag, command, or cog."""
- async def convert(self, ctx: commands.Context, argument: str) -> SourceType:
+ @staticmethod
+ async def convert(ctx: commands.Context, argument: str) -> SourceType:
"""Convert argument into source object."""
- if argument.lower().startswith("help"):
+ if argument.lower() == "help":
return ctx.bot.help_command
cog = ctx.bot.get_cog(argument)