[Downloader] Improve InstalledCog converter's error message (#3409)

* Update converters.py

* Create 3409.misc.rst
This commit is contained in:
jack1142 2020-01-20 23:09:55 +01:00 committed by Michael H
parent 8f04fd436f
commit c7fd64e0c8
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1 @@
Improve error message when user passes cog that isn't installed to a command that only accepts installed cogs.

View File

@ -15,6 +15,8 @@ class InstalledCog(InstalledModule):
cog = discord.utils.get(await downloader.installed_cogs(), name=arg) cog = discord.utils.get(await downloader.installed_cogs(), name=arg)
if cog is None: if cog is None:
raise commands.BadArgument(_("That cog is not installed")) raise commands.BadArgument(
_("Cog `{cog_name}` is not installed.").format(cog_name=arg)
)
return cog return cog