[Downloader] findcog no longer attempts to find cogs for commands without them (#2970)

* findcog no longer attempts to find cogs for commands without them

* changelog

* full stop
This commit is contained in:
Michael H 2019-09-26 12:19:58 -04:00 committed by GitHub
parent af97175839
commit 62dcebff94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View File

@ -0,0 +1 @@
findcog no longer attempts to find a cog for commands without one.

View File

@ -590,12 +590,16 @@ class Downloader(commands.Cog):
return return
# Check if in installed cogs # Check if in installed cogs
cog_name = self.cog_name_from_instance(command.cog) cog = command.cog
installed, cog_installable = await self.is_installed(cog_name) if cog:
if installed: cog_name = self.cog_name_from_instance(cog)
msg = self.format_findcog_info(command_name, cog_installable) 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: else:
# Assume it's in a base cog msg = _("This command is not provided by a cog.")
msg = self.format_findcog_info(command_name, command.cog)
await ctx.send(box(msg)) await ctx.send(box(msg))