mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-23 03:08:01 -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:
13
redbot/core/commands/errors.py
Normal file
13
redbot/core/commands/errors.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""Errors module for the commands package."""
|
||||
from discord.ext import commands
|
||||
|
||||
__all__ = ["ConversionFailure"]
|
||||
|
||||
|
||||
class ConversionFailure(commands.BadArgument):
|
||||
"""Raised when converting an argument fails."""
|
||||
|
||||
def __init__(self, converter, argument: str, *args):
|
||||
self.converter = converter
|
||||
self.argument = argument
|
||||
super().__init__(*args)
|
||||
Reference in New Issue
Block a user