Fix various reference issues in documentation

Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
This commit is contained in:
Josh
2021-05-06 21:51:07 +10:00
committed by GitHub
parent 1bf7aadf94
commit 3864fb37a0
24 changed files with 106 additions and 52 deletions

View File

@ -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
~~~~~~~~~~~~~~~~~~~

View File

@ -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 = """

View File

@ -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`

View File

@ -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

View File

@ -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.

Binary file not shown.

View File

@ -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.