diff options
| author | Josh <[email protected]> | 2021-05-06 21:51:07 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-06 07:51:07 -0400 |
| commit | 3864fb37a0814345913c7ca4fd1978fa5e2ef7e2 (patch) | |
| tree | e5a411b6e35fe3485381880a40223cc574d5e2e9 /docs | |
| parent | Typehint emoji classes (diff) | |
| download | discord.py-3864fb37a0814345913c7ca4fd1978fa5e2ef7e2.tar.xz discord.py-3864fb37a0814345913c7ca4fd1978fa5e2ef7e2.zip | |
Fix various reference issues in documentation
Co-Authored-By: Riley Shaw <[email protected]>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 63 | ||||
| -rw-r--r-- | docs/conf.py | 2 | ||||
| -rw-r--r-- | docs/ext/commands/api.rst | 10 | ||||
| -rw-r--r-- | docs/ext/commands/commands.rst | 2 | ||||
| -rw-r--r-- | docs/quickstart.rst | 2 | ||||
| -rw-r--r-- | docs/requests.inv | bin | 195 -> 0 bytes | |||
| -rw-r--r-- | docs/whats_new.rst | 2 |
7 files changed, 70 insertions, 11 deletions
diff --git a/docs/api.rst b/docs/api.rst index ff4ec907..44b1e727 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -367,7 +367,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds. - If this occurs increase the :attr:`Client.max_messages` attribute + If this occurs increase the :class:`max_messages <Client>` parameter or use the :func:`on_raw_message_delete` event instead. This requires :attr:`Intents.messages` to be enabled. @@ -384,7 +384,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. the messages list. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds. - If this occurs increase the :attr:`Client.max_messages` attribute + If this occurs increase the :class:`max_messages <Client>` parameter or use the :func:`on_raw_bulk_message_delete` event instead. This requires :attr:`Intents.messages` to be enabled. @@ -425,7 +425,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds. - If this occurs increase the :attr:`Client.max_messages` attribute + If this occurs increase the :class:`max_messages <Client>` parameter or use the :func:`on_raw_message_edit` event instead. The following non-exhaustive cases trigger this event: @@ -1078,6 +1078,59 @@ of :class:`enum.Enum`. .. versionadded:: 2.0 +.. class:: UserFlags + + Represents Discord User flags. + + .. attribute:: staff + + The user is a Discord Employee. + .. attribute:: partner + + The user is a Discord Partner. + .. attribute:: hypesquad + + The user is a HypeSquad Events member. + .. attribute:: bug_hunter + + The user is a Bug Hunter. + .. attribute:: mfa_sms + + The user has SMS recovery for Multi Factor Authentication enabled. + .. attribute:: premium_promo_dismissed + + The user has dismissed the Discord Nitro promotion. + .. attribute:: hypesquad_bravery + + The user is a HypeSquad Bravery member. + .. attribute:: hypesquad_brilliance + + The user is a HypeSquad Brilliance member. + .. attribute:: hypesquad_balance + + The user is a HypeSquad Balance member. + .. attribute:: early_supporter + + The user is an Early Supporter. + .. attribute:: team_user + + The user is a Team User. + .. attribute:: system + + The user is a system user (i.e. represents Discord officially). + .. attribute:: has_unread_urgent_messages + + The user has an unready system message. + .. attribute:: bug_hunter_level_2 + + The user is a Bug Hunter Level 2. + .. attribute:: verified_bot + + The user is a Verified Bot. + .. attribute:: verified_bot_developer + + The user is an Early Verified Bot Developer. + .. class:: ActivityType Specifies the type of :class:`Activity`. This is used to check how to @@ -1854,7 +1907,7 @@ of :class:`enum.Enum`. .. class:: TeamMembershipState - Represents the membership state of a team member retrieved through :func:`Bot.application_info`. + Represents the membership state of a team member retrieved through :func:`Client.application_info`. .. versionadded:: 1.3 @@ -2581,6 +2634,7 @@ Webhook .. autoclass:: Webhook() :members: + :inherited-members: WebhookMessage ~~~~~~~~~~~~~~~~ @@ -2597,6 +2651,7 @@ SyncWebhook .. autoclass:: SyncWebhook() :members: + :inherited-members: SyncWebhookMessage ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/conf.py b/docs/conf.py index aed9086b..925d5339 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,7 +53,7 @@ extlinks = { intersphinx_mapping = { 'py': ('https://docs.python.org/3', None), 'aio': ('https://docs.aiohttp.org/en/stable/', None), - 'req': ('http://docs.python-requests.org/en/latest/', 'requests.inv') + 'req': ('https://docs.python-requests.org/en/latest/', None) } rst_prolog = """ diff --git a/docs/ext/commands/api.rst b/docs/ext/commands/api.rst index 9cd655b4..aa31a000 100644 --- a/docs/ext/commands/api.rst +++ b/docs/ext/commands/api.rst @@ -42,7 +42,7 @@ Event Reference These events function similar to :ref:`the regular events <discord-api-events>`, except they are custom to the command extension module. -.. function:: on_command_error(ctx, error) +.. function:: discord.ext.commands.on_command_error(ctx, error) An error handler that is called when an error is raised inside a command either through user input error, check @@ -55,7 +55,7 @@ are custom to the command extension module. :param error: The error that was raised. :type error: :class:`.CommandError` derived -.. function:: on_command(ctx) +.. function:: discord.ext.commands.on_command(ctx) An event that is called when a command is found and is about to be invoked. @@ -65,7 +65,7 @@ are custom to the command extension module. :param ctx: The invocation context. :type ctx: :class:`.Context` -.. function:: on_command_completion(ctx) +.. function:: discord.ext.commands.on_command_completion(ctx) An event that is called when a command has completed its invocation. @@ -374,6 +374,9 @@ Exceptions .. autoexception:: discord.ext.commands.BadUnionArgument :members: +.. autoexception:: discord.ext.commands.BadLiteralArgument + :members: + .. autoexception:: discord.ext.commands.PrivateMessageOnly :members: @@ -533,6 +536,7 @@ Exception Hierarchy - :exc:`~.commands.TooManyFlags` - :exc:`~.commands.MissingRequiredFlag` - :exc:`~.commands.BadUnionArgument` + - :exc:`~.commands.BadLiteralArgument` - :exc:`~.commands.ArgumentParsingError` - :exc:`~.commands.UnexpectedQuoteError` - :exc:`~.commands.InvalidEndOfQuotedStringError` diff --git a/docs/ext/commands/commands.rst b/docs/ext/commands/commands.rst index a5f8998b..6e1f4223 100644 --- a/docs/ext/commands/commands.rst +++ b/docs/ext/commands/commands.rst @@ -761,7 +761,7 @@ When our commands fail to parse we will, by default, receive a noisy error in `` that an error has happened and has been silently ignored. In order to handle our errors, we must use something called an error handler. There is a global error handler, called -:func:`on_command_error` which works like any other event in the :ref:`discord-api-events`. This global error handler is +:func:`.on_command_error` which works like any other event in the :ref:`discord-api-events`. This global error handler is called for every error reached. Most of the time however, we want to handle an error local to the command itself. Luckily, commands come with local error diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 52553cd4..8b3daeb2 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -56,7 +56,7 @@ There's a lot going on here, so let's walk you through it step by step. is the same as the :attr:`Client.user`. 5. Afterwards, we check if the :class:`Message.content` starts with ``'$hello'``. If it does, then we send a message in the channel it was used in with ``'Hello!'``. This is a basic way of - handling commands, which can be later automated with the :ref:`ext.commands` framework. + handling commands, which can be later automated with the :doc:`./ext/commands/index` framework. 6. Finally, we run the bot with our login token. If you need help getting your token or creating a bot, look in the :ref:`discord-intro` section. diff --git a/docs/requests.inv b/docs/requests.inv Binary files differdeleted file mode 100644 index 7deac0ce..00000000 --- a/docs/requests.inv +++ /dev/null diff --git a/docs/whats_new.rst b/docs/whats_new.rst index 2b774c15..91207252 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -1173,4 +1173,4 @@ Bug Fixes - Mentions are now triggered normally. This was changed due to the way discord handles it internally. - Fix issue when a :class:`Message` would attempt to upgrade a :attr:`Message.server` when the channel is a :class:`Object`. -- Unavailable servers were not being added into cache, this has been corrected. +- Unavailable servers were not being added into cache, this has been corrected.
\ No newline at end of file |