mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
[V3] Send meaningful responses on conversion failure (#1817)
* [V3] Send meaningful responses on conversion failures * Replace existing `discord.ext.commands` imports Just to be sure * Better Permissions converter response
This commit is contained in:
@@ -11,7 +11,10 @@ class CogOrCommand(commands.Converter):
|
||||
if ret:
|
||||
return "commands", ret.qualified_name
|
||||
|
||||
raise commands.BadArgument()
|
||||
raise commands.BadArgument(
|
||||
'Cog or command "{arg}" not found. Please note that this is case sensitive.'
|
||||
"".format(arg=arg)
|
||||
)
|
||||
|
||||
|
||||
class RuleType(commands.Converter):
|
||||
@@ -21,4 +24,6 @@ class RuleType(commands.Converter):
|
||||
if arg.lower() in ("deny", "blacklist", "denied"):
|
||||
return "deny"
|
||||
|
||||
raise commands.BadArgument()
|
||||
raise commands.BadArgument(
|
||||
'"{arg}" is not a valid rule. Valid rules are "allow" or "deny"'.format(arg=arg)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user