diff options
author | 2020-08-04 17:52:16 -0700 | |
---|---|---|
committer | 2020-08-04 17:52:16 -0700 | |
commit | bcb8f27cba8d1413d302d11e38d122f915f96e14 (patch) | |
tree | d1c7b161d561b3fab76b641701ae155c19cb9a98 | |
parent | Source: raise BadArgument for dynamically-created objects (diff) |
Source: remove redundant check for help commands
The code is identical to the else block and there's no reason for
help commands to have an explicit check.
-rw-r--r-- | bot/cogs/source.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/cogs/source.py b/bot/cogs/source.py index 89548613d..205e0ba81 100644 --- a/bot/cogs/source.py +++ b/bot/cogs/source.py @@ -65,10 +65,7 @@ class BotSource(commands.Cog): Raise BadArgument if `source_item` is a dynamically-created object (e.g. via internal eval). """ - if isinstance(source_item, commands.HelpCommand): - src = type(source_item) - filename = inspect.getsourcefile(src) - elif isinstance(source_item, commands.Command): + if isinstance(source_item, commands.Command): if source_item.cog_name == "Alias": cmd_name = source_item.callback.__name__.replace("_alias", "") cmd = self.bot.get_command(cmd_name.replace("_", " ")) |