looks like I changed stuff?

This commit is contained in:
iDutchy
2021-06-25 20:29:27 -05:00
78 changed files with 2136 additions and 2539 deletions

View File

@@ -340,7 +340,7 @@ to handle it, which defaults to print a traceback and ignoring the exception.
:type channel: :class:`abc.Messageable`
:param user: The user that started typing.
:type user: Union[:class:`User`, :class:`Member`]
:param when: When the typing started as a naive datetime in UTC.
:param when: When the typing started as an aware datetime in UTC.
:type when: :class:`datetime.datetime`
.. function:: on_message(message)
@@ -585,6 +585,17 @@ to handle it, which defaults to print a traceback and ignoring the exception.
:param payload: The raw event payload data.
:type payload: :class:`RawReactionClearEmojiEvent`
.. function:: on_interaction(interaction)
Called when an interaction happened.
This currently happens due to slash command invocations.
.. versionadded:: 2.0
:param interaction: The interaction data.
:type interaction: :class:`Interaction`
.. function:: on_private_channel_delete(channel)
on_private_channel_create(channel)
@@ -612,7 +623,7 @@ to handle it, which defaults to print a traceback and ignoring the exception.
:param channel: The private channel that had its pins updated.
:type channel: :class:`abc.PrivateChannel`
:param last_pin: The latest message that was pinned as a naive datetime in UTC. Could be ``None``.
:param last_pin: The latest message that was pinned as an aware datetime in UTC. Could be ``None``.
:type last_pin: Optional[:class:`datetime.datetime`]
.. function:: on_guild_channel_delete(channel)
@@ -646,7 +657,7 @@ to handle it, which defaults to print a traceback and ignoring the exception.
:param channel: The guild channel that had its pins updated.
:type channel: :class:`abc.GuildChannel`
:param last_pin: The latest message that was pinned as a naive datetime in UTC. Could be ``None``.
:param last_pin: The latest message that was pinned as an aware datetime in UTC. Could be ``None``.
:type last_pin: Optional[:class:`datetime.datetime`]
.. function:: on_guild_integrations_update(guild)
@@ -897,29 +908,6 @@ to handle it, which defaults to print a traceback and ignoring the exception.
:param user: The user that joined or left.
:type user: :class:`User`
.. function:: on_relationship_add(relationship)
on_relationship_remove(relationship)
Called when a :class:`Relationship` is added or removed from the
:class:`ClientUser`.
.. deprecated:: 1.7
:param relationship: The relationship that was added or removed.
:type relationship: :class:`Relationship`
.. function:: on_relationship_update(before, after)
Called when a :class:`Relationship` is updated, e.g. when you
block a friend or a friendship is accepted.
.. deprecated:: 1.7
:param before: The previous relationship status.
:type before: :class:`Relationship`
:param after: The updated relationship status.
:type after: :class:`Relationship`
.. _discord-api-utils:
Utility Functions
@@ -945,96 +933,7 @@ Utility Functions
.. autofunction:: discord.utils.sleep_until
Profile
---------
.. class:: Profile
A namedtuple representing a user's Discord public profile.
.. deprecated:: 1.7
.. attribute:: user
The :class:`User` the profile belongs to.
:type: :class:`User`
.. attribute:: premium
A boolean indicating if the user has premium (i.e. Discord Nitro).
:type: :class:`bool`
.. attribute:: nitro
An alias for :attr:`premium`.
.. attribute:: premium_since
A naive UTC datetime indicating how long the user has been premium since.
This could be ``None`` if not applicable.
:type: :class:`datetime.datetime`
.. attribute:: staff
A boolean indicating if the user is Discord Staff.
:type: :class:`bool`
.. attribute:: partner
A boolean indicating if the user is a Discord Partner.
:type: :class:`bool`
.. attribute:: bug_hunter
A boolean indicating if the user is a Bug Hunter.
:type: :class:`bool`
.. attribute:: early_supporter
A boolean indicating if the user has had premium before 10 October, 2018.
:type: :class:`bool`
.. attribute:: hypesquad
A boolean indicating if the user is in Discord HypeSquad.
:type: :class:`bool`
.. attribute:: hypesquad_houses
A list of :class:`HypeSquadHouse` that the user is in.
:type: List[:class:`HypeSquadHouse`]
.. attribute:: team_user
A boolean indicating if the user is in part of a team.
.. versionadded:: 1.3
:type: :class:`bool`
.. attribute:: system
A boolean indicating if the user is officially part of the Discord urgent message system.
.. versionadded:: 1.3
:type: :class:`bool`
.. attribute:: mutual_guilds
A list of :class:`Guild` that the :class:`ClientUser` shares with this
user.
:type: List[:class:`Guild`]
.. attribute:: connected_accounts
A list of dict objects indicating the accounts the user has connected.
An example entry can be seen below: ::
{"type": "twitch", "id": "92473777", "name": "discordapp"}
:type: List[Dict[:class:`str`, :class:`str`]]
.. autofunction:: discord.utils.utcnow
.. _discord-api-enums:
@@ -1201,6 +1100,20 @@ of :class:`enum.Enum`.
.. versionadded:: 1.5
.. class:: InteractionType
Specifies the type of :class:`Interaction`.
.. versionadded:: 2.0
.. attribute:: ping
Represents Discord pinging to see if the interaction response server is alive.
.. attribute:: application_command
Represents a slash command interaction.
.. class:: HypeSquadHouse
Specifies the HypeSquad house a user belongs to.
@@ -1940,127 +1853,6 @@ of :class:`enum.Enum`.
The action is the update of something.
.. class:: RelationshipType
Specifies the type of :class:`Relationship`.
.. deprecated:: 1.7
.. note::
This only applies to users, *not* bots.
.. attribute:: friend
You are friends with this user.
.. attribute:: blocked
You have blocked this user.
.. attribute:: incoming_request
The user has sent you a friend request.
.. attribute:: outgoing_request
You have sent a friend request to this user.
.. class:: UserContentFilter
Represents the options found in ``Settings > Privacy & Safety > Safe Direct Messaging``
in the Discord client.
.. deprecated:: 1.7
.. note::
This only applies to users, *not* bots.
.. attribute:: all_messages
Scan all direct messages from everyone.
.. attribute:: friends
Scan all direct messages that aren't from friends.
.. attribute:: disabled
Don't scan any direct messages.
.. class:: FriendFlags
Represents the options found in ``Settings > Privacy & Safety > Who Can Add You As A Friend``
in the Discord client.
.. deprecated:: 1.7
.. note::
This only applies to users, *not* bots.
.. attribute:: noone
This allows no-one to add you as a friend.
.. attribute:: mutual_guilds
This allows guild members to add you as a friend.
.. attribute:: mutual_friends
This allows friends of friends to add you as a friend.
.. attribute:: guild_and_friends
This is a superset of :attr:`mutual_guilds` and :attr:`mutual_friends`.
.. attribute:: everyone
This allows everyone to add you as a friend.
.. class:: PremiumType
Represents the user's Discord Nitro subscription type.
.. deprecated:: 1.7
.. note::
This only applies to users, *not* bots.
.. attribute:: nitro
Represents the Discord Nitro with Nitro-exclusive games.
.. attribute:: nitro_classic
Represents the Discord Nitro with no Nitro-exclusive games.
.. class:: Theme
Represents the theme synced across all Discord clients.
.. deprecated:: 1.7
.. note::
This only applies to users, *not* bots.
.. attribute:: light
Represents the Light theme on Discord.
.. attribute:: dark
Represents the Dark theme on Discord.
.. class:: TeamMembershipState
Represents the membership state of a team member retrieved through :func:`Bot.application_info`.
@@ -2734,20 +2526,19 @@ interface, :meth:`WebhookAdapter.request`.
Abstract Base Classes
-----------------------
An :term:`py:abstract base class` (also known as an ``abc``) is a class that models can inherit
to get their behaviour. The Python implementation of an :doc:`abc <py:library/abc>` is
slightly different in that you can register them at run-time. **Abstract base classes cannot be instantiated**.
They are mainly there for usage with :func:`py:isinstance` and :func:`py:issubclass`\.
An :term:`abstract base class` (also known as an ``abc``) is a class that models can inherit
to get their behaviour. **Abstract base classes should not be instantiated**.
They are mainly there for usage with :func:`isinstance` and :func:`issubclass`\.
This library has a module related to abstract base classes, some of which are actually from the :doc:`abc <py:library/abc>` standard
module, others which are not.
This library has a module related to abstract base classes, in which all the ABCs are subclasses of
:class:`typing.Protocol`.
Snowflake
~~~~~~~~~~
.. attributetable:: discord.abc.Snowflake
.. autoclass:: discord.abc.Snowflake
.. autoclass:: discord.abc.Snowflake()
:members:
User
@@ -2755,7 +2546,7 @@ User
.. attributetable:: discord.abc.User
.. autoclass:: discord.abc.User
.. autoclass:: discord.abc.User()
:members:
PrivateChannel
@@ -2763,7 +2554,7 @@ PrivateChannel
.. attributetable:: discord.abc.PrivateChannel
.. autoclass:: discord.abc.PrivateChannel
.. autoclass:: discord.abc.PrivateChannel()
:members:
GuildChannel
@@ -2771,7 +2562,7 @@ GuildChannel
.. attributetable:: discord.abc.GuildChannel
.. autoclass:: discord.abc.GuildChannel
.. autoclass:: discord.abc.GuildChannel()
:members:
Messageable
@@ -2779,7 +2570,7 @@ Messageable
.. attributetable:: discord.abc.Messageable
.. autoclass:: discord.abc.Messageable
.. autoclass:: discord.abc.Messageable()
:members:
:exclude-members: history, typing
@@ -2794,7 +2585,7 @@ Connectable
.. attributetable:: discord.abc.Connectable
.. autoclass:: discord.abc.Connectable
.. autoclass:: discord.abc.Connectable()
.. _discord_api_models:
@@ -2832,14 +2623,6 @@ ClientUser
:members:
:inherited-members:
Relationship
~~~~~~~~~~~~~~
.. attributetable:: Relationship
.. autoclass:: Relationship()
:members:
User
~~~~~
@@ -2901,22 +2684,6 @@ Reaction
.. automethod:: users
:async-for:
CallMessage
~~~~~~~~~~~~
.. attributetable:: CallMessage
.. autoclass:: CallMessage()
:members:
GroupCall
~~~~~~~~~~
.. attributetable:: GroupCall
.. autoclass:: GroupCall()
:members:
Guild
~~~~~~
@@ -2957,6 +2724,14 @@ Integration
.. autoclass:: IntegrationAccount()
:members:
Interaction
~~~~~~~~~~~~
.. attributetable:: Interaction
.. autoclass:: Interaction()
:members:
Member
~~~~~~
@@ -3218,6 +2993,21 @@ RawReactionClearEmojiEvent
.. autoclass:: RawReactionClearEmojiEvent()
:members:
PartialWebhookGuild
~~~~~~~~~~~~~~~~~~~~
.. attributetable:: PartialWebhookGuild
.. autoclass:: PartialWebhookGuild()
:members:
PartialWebhookChannel
~~~~~~~~~~~~~~~~~~~~~~~
.. attributetable:: PartialWebhookChannel
.. autoclass:: PartialWebhookChannel()
:members:
.. _discord_api_data:

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# discord.py documentation build configuration file, created by
# sphinx-quickstart on Fri Aug 21 05:43:30 2015.
@@ -44,6 +43,7 @@ extensions = [
]
autodoc_member_order = 'bysource'
autodoc_typehints = 'none'
extlinks = {
'issue': ('https://github.com/Rapptz/discord.py/issues/%s', 'GH-'),
@@ -76,8 +76,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'discord.py'
copyright = u'2015-present, Rapptz'
project = 'discord.py'
copyright = '2015-present, Rapptz'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -160,7 +160,7 @@ resource_links = {
'discord': 'https://discord.gg/r3sSKJJ',
'issues': 'https://github.com/Rapptz/discord.py/issues',
'discussions': 'https://github.com/Rapptz/discord.py/discussions',
'examples': 'https://github.com/Rapptz/discord.py/tree/%s/examples' % branch,
'examples': f'https://github.com/Rapptz/discord.py/tree/{branch}/examples',
}
# Theme options are theme-specific and customize the look and feel of a theme
@@ -283,8 +283,8 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'discord.py.tex', u'discord.py Documentation',
u'Rapptz', 'manual'),
('index', 'discord.py.tex', 'discord.py Documentation',
'Rapptz', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -313,8 +313,8 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'discord.py', u'discord.py Documentation',
[u'Rapptz'], 1)
('index', 'discord.py', 'discord.py Documentation',
['Rapptz'], 1)
]
# If true, show URL addresses after external links.
@@ -327,8 +327,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'discord.py', u'discord.py Documentation',
u'Rapptz', 'discord.py', 'One line description of project.',
('index', 'discord.py', 'discord.py Documentation',
'Rapptz', 'discord.py', 'One line description of project.',
'Miscellaneous'),
]

View File

@@ -379,7 +379,10 @@ A lot of discord models work out of the gate as a parameter:
- :class:`PartialMessage` (since v1.7)
- :class:`TextChannel`
- :class:`VoiceChannel`
<<<<<<< HEAD
- :class:`StageChannel` (since v1.7)
=======
>>>>>>> 523e35e4f3c3c49d4e471359f9fb559242bbecc8
- :class:`StoreChannel` (since v1.7)
- :class:`CategoryChannel`
- :class:`Invite`
@@ -411,10 +414,15 @@ converter is given below:
+--------------------------+-------------------------------------------------+
| :class:`VoiceChannel` | :class:`~ext.commands.VoiceChannelConverter` |
+--------------------------+-------------------------------------------------+
<<<<<<< HEAD
| :class:`StageChannel` | :class:`~ext.commands.StageChannelConverter` |
+--------------------------+-------------------------------------------------+
| :class:`StoreChannel` | :class:`~ext.commands.StoreChannelConverter` |
+--------------------------+-------------------------------------------------+
=======
| :class:`StoreChannel` | :class:`~ext.commands.StoreChannelConverter` |
+--------------------------+-------------------------------------------------+
>>>>>>> 523e35e4f3c3c49d4e471359f9fb559242bbecc8
| :class:`CategoryChannel` | :class:`~ext.commands.CategoryChannelConverter` |
+--------------------------+-------------------------------------------------+
| :class:`Invite` | :class:`~ext.commands.InviteConverter` |

View File

@@ -32,6 +32,10 @@ Likewise, **this is the last version to support user bots**.
Development of v2.0 will have breaking changes and support for newer API features.
<<<<<<< HEAD
=======
>>>>>>> 523e35e4f3c3c49d4e471359f9fb559242bbecc8
- Add support for stage channels via :class:`StageChannel` (:issue:`6602`, :issue:`6608`)
- Add support for :attr:`MessageReference.fail_if_not_exists` (:issue:`6484`)
- By default, if the message you're replying to doesn't exist then the API errors out.