[Downloader] Fix [p]findcog not working with different levels of imports (#3178)

* Update downloader.py

* Create 3177.bugfix.rst
This commit is contained in:
jack1142 2019-12-08 23:58:43 +01:00 committed by Michael H
parent 0f62614055
commit 9a051ef2c6
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
``[p]findcog`` now properly works for cogs with less typical folder structure.

View File

@ -1179,7 +1179,7 @@ class Downloader(commands.Cog):
""" """
splitted = instance.__module__.split(".") splitted = instance.__module__.split(".")
return splitted[-2] return splitted[0]
@commands.command() @commands.command()
async def findcog(self, ctx: commands.Context, command_name: str) -> None: async def findcog(self, ctx: commands.Context, command_name: str) -> None: