diff --git a/changelog.d/downloader/2902.bugfix.rst b/changelog.d/downloader/2902.bugfix.rst new file mode 100644 index 000000000..62cbfea63 --- /dev/null +++ b/changelog.d/downloader/2902.bugfix.rst @@ -0,0 +1 @@ +findcog no longer attempts to find a cog for commands without one. \ No newline at end of file diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py index 820f791e3..6451cb5fc 100644 --- a/redbot/cogs/downloader/downloader.py +++ b/redbot/cogs/downloader/downloader.py @@ -590,12 +590,16 @@ class Downloader(commands.Cog): return # Check if in installed cogs - cog_name = self.cog_name_from_instance(command.cog) - installed, cog_installable = await self.is_installed(cog_name) - if installed: - msg = self.format_findcog_info(command_name, cog_installable) + cog = command.cog + if cog: + cog_name = self.cog_name_from_instance(cog) + installed, cog_installable = await self.is_installed(cog_name) + if installed: + msg = self.format_findcog_info(command_name, cog_installable) + else: + # Assume it's in a base cog + msg = self.format_findcog_info(command_name, cog) else: - # Assume it's in a base cog - msg = self.format_findcog_info(command_name, command.cog) + msg = _("This command is not provided by a cog.") await ctx.send(box(msg))