fix conflicts
This commit is contained in:
@@ -176,7 +176,8 @@ Paginator
|
||||
Enums
|
||||
------
|
||||
|
||||
.. class:: discord.ext.commands.BucketType
|
||||
.. class:: BucketType
|
||||
:module: discord.ext.commands
|
||||
|
||||
Specifies a type of bucket for, e.g. a cooldown.
|
||||
|
||||
@@ -281,18 +282,30 @@ Converters
|
||||
.. autoclass:: discord.ext.commands.MessageConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.PartialMessageConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.TextChannelConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.VoiceChannelConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.StoreChannelConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.StageChannelConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.CategoryChannelConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.InviteConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.GuildConverter
|
||||
:members:
|
||||
|
||||
.. autoclass:: discord.ext.commands.RoleConverter
|
||||
:members:
|
||||
|
||||
@@ -407,6 +420,9 @@ Exceptions
|
||||
.. autoexception:: discord.ext.commands.MemberNotFound
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.GuildNotFound
|
||||
:members:
|
||||
|
||||
.. autoexception:: discord.ext.commands.UserNotFound
|
||||
:members:
|
||||
|
||||
|
@@ -193,6 +193,8 @@ Converters come in a few flavours:
|
||||
|
||||
- A custom class that inherits from :class:`~ext.commands.Converter`.
|
||||
|
||||
.. _ext_commands_basic_converters:
|
||||
|
||||
Basic Converters
|
||||
++++++++++++++++++
|
||||
|
||||
@@ -325,7 +327,7 @@ For example, a common idiom would be to have a class and a converter for that cl
|
||||
else:
|
||||
await ctx.send("Hm you're not so new.")
|
||||
|
||||
This can get tedious, so an inline advanced converter is possible through a ``classmethod`` inside the type:
|
||||
This can get tedious, so an inline advanced converter is possible through a :func:`classmethod` inside the type:
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
@@ -373,16 +375,20 @@ A lot of discord models work out of the gate as a parameter:
|
||||
|
||||
- :class:`Member`
|
||||
- :class:`User`
|
||||
- :class:`Message` (since v1.1)
|
||||
- :class:`PartialMessage` (since v1.7)
|
||||
- :class:`TextChannel`
|
||||
- :class:`VoiceChannel`
|
||||
- :class:`StageChannel` (since v1.7)
|
||||
- :class:`StoreChannel` (since v1.7)
|
||||
- :class:`CategoryChannel`
|
||||
- :class:`Role`
|
||||
- :class:`Message` (since v1.1)
|
||||
- :class:`Invite`
|
||||
- :class:`Guild` (since v1.7)
|
||||
- :class:`Role`
|
||||
- :class:`Game`
|
||||
- :class:`Colour`
|
||||
- :class:`Emoji`
|
||||
- :class:`PartialEmoji`
|
||||
- :class:`Colour`
|
||||
|
||||
Having any of these set as the converter will intelligently convert the argument to the appropriate target type you
|
||||
specify.
|
||||
@@ -395,28 +401,36 @@ converter is given below:
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Member` | :class:`~ext.commands.MemberConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`User` | :class:`~ext.commands.UserConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Message` | :class:`~ext.commands.MessageConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`User` | :class:`~ext.commands.UserConverter` |
|
||||
| :class:`PartialMessage` | :class:`~ext.commands.PartialMessageConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`TextChannel` | :class:`~ext.commands.TextChannelConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`VoiceChannel` | :class:`~ext.commands.VoiceChannelConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`CategoryChannel` | :class:`~ext.commands.CategoryChannelConverter` |
|
||||
| :class:`StageChannel` | :class:`~ext.commands.StageChannelConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Role` | :class:`~ext.commands.RoleConverter` |
|
||||
| :class:`StoreChannel` | :class:`~ext.commands.StoreChannelConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`CategoryChannel` | :class:`~ext.commands.CategoryChannelConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Invite` | :class:`~ext.commands.InviteConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Guild` | :class:`~ext.commands.GuildConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Role` | :class:`~ext.commands.RoleConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Game` | :class:`~ext.commands.GameConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Colour` | :class:`~ext.commands.ColourConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Emoji` | :class:`~ext.commands.EmojiConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`PartialEmoji` | :class:`~ext.commands.PartialEmojiConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
| :class:`Colour` | :class:`~ext.commands.ColourConverter` |
|
||||
+--------------------------+-------------------------------------------------+
|
||||
|
||||
By providing the converter it allows us to use them as building blocks for another converter:
|
||||
|
||||
|
@@ -27,7 +27,7 @@ An example extension looks like this:
|
||||
def setup(bot):
|
||||
bot.add_command(hello)
|
||||
|
||||
In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.commands.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``.
|
||||
In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``.
|
||||
|
||||
.. admonition:: Cogs
|
||||
:class: helpful
|
||||
@@ -41,7 +41,7 @@ In this example we define a simple command, and when the extension is loaded thi
|
||||
Reloading
|
||||
-----------
|
||||
|
||||
When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`Bot.reload_extension`.
|
||||
When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`.Bot.reload_extension`.
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
|
@@ -139,5 +139,6 @@ API Reference
|
||||
|
||||
.. autoclass:: discord.ext.tasks.Loop()
|
||||
:members:
|
||||
:special-members: __call__
|
||||
|
||||
.. autofunction:: discord.ext.tasks.loop
|
||||
|
Reference in New Issue
Block a user