diff options
| author | James <[email protected]> | 2020-07-04 15:46:37 +0100 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-07-08 23:01:00 -0400 |
| commit | 475762e8df9c87c7a7e20b94e23459e626d288bd (patch) | |
| tree | d408f85c4c25dbfeda1b4df26a4fc0c48a4056c2 | |
| parent | Add a licence and encoding declaration to missing files (diff) | |
| download | discord.py-475762e8df9c87c7a7e20b94e23459e626d288bd.tar.xz discord.py-475762e8df9c87c7a7e20b94e23459e626d288bd.zip | |
Document raises for Converter.convert
| -rw-r--r-- | discord/ext/commands/converter.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 123b6699..30345695 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -87,6 +87,13 @@ class Converter: The invocation context that the argument is being used in. argument: :class:`str` The argument that is being converted. + + Raises + ------- + :exc:`.CommandError` + A generic exception occurred when converting the argument. + :exc:`.BadArgument` + The converter failed to convert the argument. """ raise NotImplementedError('Derived classes need to implement this.') @@ -180,6 +187,7 @@ class UserConverter(IDConverter): raise BadArgument('User "{}" not found'.format(argument)) return result + class MessageConverter(Converter): """Converts to a :class:`discord.Message`. |