aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-04-12 19:30:55 +0100
committerGravatar GitHub <[email protected]>2021-04-12 19:30:55 +0100
commit806a057eb97e02ccfd14e1f7644f5c04d4e749cd (patch)
tree4597cad33f489d78341ba71e09d1749a0b465cf5
parentRemove reactions from everyone when paginating and waiting for trashcan react... (diff)
parentMerge branch 'main' into dont-use-startswith (diff)
Merge pull request #1521 from ToxicKidz/dont-use-startswith
Use == instead of str.startswith when getting the source for a Command
-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 78a6f68ac..ef07c77a1 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)