diff options
| author | 2020-10-01 09:25:43 -0700 | |
|---|---|---|
| committer | 2020-10-01 09:25:43 -0700 | |
| commit | cf9d08ffcf65196162f984fecc9341052cc31abd (patch) | |
| tree | 8f0f0b1c03281e2882428c2609e54f9a5288c423 | |
| parent | Remove alias cog (diff) | |
Remove special handling for the alias cog in the !source command
It's obsolete code because the cog has been removed.
| -rw-r--r-- | bot/exts/info/source.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py index 205e0ba81..f79be36b0 100644 --- a/bot/exts/info/source.py +++ b/bot/exts/info/source.py @@ -66,14 +66,8 @@ class BotSource(commands.Cog): Raise BadArgument if `source_item` is a dynamically-created object (e.g. via internal eval). """ 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("_", " ")) - src = cmd.callback.__code__ - filename = src.co_filename - else: - src = source_item.callback.__code__ - filename = src.co_filename + src = source_item.callback.__code__ + filename = src.co_filename elif isinstance(source_item, str): tags_cog = self.bot.get_cog("Tags") filename = tags_cog._cache[source_item]["location"] @@ -113,13 +107,7 @@ class BotSource(commands.Cog): title = "Help Command" description = source_object.__doc__.splitlines()[1] elif isinstance(source_object, commands.Command): - if source_object.cog_name == "Alias": - cmd_name = source_object.callback.__name__.replace("_alias", "") - cmd = self.bot.get_command(cmd_name.replace("_", " ")) - description = cmd.short_doc - else: - description = source_object.short_doc - + description = source_object.short_doc title = f"Command: {source_object.qualified_name}" elif isinstance(source_object, str): title = f"Tag: {source_object}" |