Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bc7b32f
:memo: Remove empty note in CategoryChannel
Paillat-dev Aug 30, 2025
a4e1b79
:memo: Fix duplicate SelectOption doc
Paillat-dev Aug 30, 2025
5d4082c
:memo: Add missing SortOrder enum documentation
Paillat-dev Aug 30, 2025
855d05d
:memo: Fix "Message Components" docs section underline length
Paillat-dev Aug 30, 2025
60fa71a
Merge branch 'master' into docs-fixes
Paillat-dev Aug 30, 2025
44757e3
:memo: Add docs to on_view_error and on_modal_error events thigny
Paillat-dev Aug 30, 2025
0aba361
:memo: fix typo in Client.get_poll docstring
Paillat-dev Aug 30, 2025
6ac322a
:memo: Fix incorrect VoiceChannelEffectSendEvent import
Paillat-dev Aug 30, 2025
9c397f2
:memo: Fix duplicate Guild.invites_disabled documentation
Paillat-dev Aug 30, 2025
1ce1f84
:memo: Fix duplicate UnfurledMediaItem.url documentation
Paillat-dev Aug 30, 2025
6e2272e
:memo: Fix duplicate MediaGalleryItem.url documentation
Paillat-dev Aug 30, 2025
d732475
:memo: Fix typo in Client.get_all_members docstring
Paillat-dev Aug 30, 2025
7595731
Revert ":memo: Fix typo in Client.get_all_members docstring"
Paillat-dev Aug 30, 2025
ae087a7
Revert ":memo: fix typo in Client.get_poll docstring"
Paillat-dev Aug 30, 2025
7eb887b
Update discord/guild.py
Paillat-dev Aug 30, 2025
c139c79
:memo: Fix missing OnboardingPrompt import
Paillat-dev Aug 30, 2025
2fcc7de
:memo: Fix typo in Guild.get_sound
Paillat-dev Aug 30, 2025
7111dce
:memo: Add missing SortOrder import
Paillat-dev Aug 30, 2025
fd60389
:memo: Fix typo in interaction import
Paillat-dev Aug 30, 2025
7ef7ee4
:memo: Add missing OnboardingMode import
Paillat-dev Aug 30, 2025
ca95316
:memo: Fix underline too short
Paillat-dev Aug 30, 2025
6acbdae
Enable autosectionlabel warning suppression in docs
Lulalaby Aug 30, 2025
7e5480b
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 30, 2025
dbc20f4
fix some more sphinx errors
Lulalaby Aug 30, 2025
748246b
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2884,8 +2884,6 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
The position in the category list. This is a number that starts at 0. e.g. the
top category is position 0. Can be ``None`` if the channel was received in an interaction.

.. note::

flags: :class:`ChannelFlags`
Extra features of the channel.

Expand Down
18 changes: 17 additions & 1 deletion discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
if TYPE_CHECKING:
from .abc import GuildChannel, PrivateChannel, Snowflake, SnowflakeTime
from .channel import DMChannel
from .interaction import Interaction
from .interactions import Interaction
from .member import Member
from .message import Message
from .poll import Poll
Expand Down Expand Up @@ -553,6 +553,15 @@ async def on_view_error(
The default view error handler provided by the client.

This only fires for a view if you did not define its :func:`~discord.ui.View.on_error`.

Parameters
----------
error: :class:`Exception`
The exception that was raised.
item: :class:`Item`
The item that the user interacted with.
interaction: :class:`Interaction`
The interaction that was received.
"""

print(
Expand All @@ -570,6 +579,13 @@ async def on_modal_error(self, error: Exception, interaction: Interaction) -> No
The default implementation prints the traceback to stderr.

This only fires for a modal if you did not define its :func:`~discord.ui.Modal.on_error`.

Parameters
----------
error: :class:`Exception`
The exception that was raised.
interaction: :class:`Interaction`
The interaction that was received.
"""

print(f"Ignoring exception in modal {interaction.modal}:", file=sys.stderr)
Expand Down
2 changes: 0 additions & 2 deletions discord/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,6 @@ def __str__(self) -> str:

@property
def url(self) -> str:
"""Returns this media item's url."""
return self._url

@url.setter
Expand Down Expand Up @@ -850,7 +849,6 @@ def __init__(self, url, *, description=None, spoiler=False):

@property
def url(self) -> str:
"""Returns the URL of this gallery's underlying media item."""
return self.media.url

def is_dispatchable(self) -> bool:
Expand Down
9 changes: 5 additions & 4 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@
EntitlementOwnerType,
NotificationLevel,
NSFWLevel,
OnboardingMode,
ScheduledEventLocationType,
ScheduledEventPrivacyLevel,
SortOrder,
VerificationLevel,
VideoQualityMode,
VoiceRegion,
Expand Down Expand Up @@ -104,6 +106,7 @@
TextChannel,
VoiceChannel,
)
from .onboarding import OnboardingPrompt
from .permissions import Permissions
from .state import ConnectionState
from .template import Template
Expand Down Expand Up @@ -175,8 +178,6 @@ class Guild(Hashable):
The channel that denotes the AFK channel. ``None`` if it doesn't exist.
id: :class:`int`
The guild's ID.
invites_disabled: :class:`bool`
Indicates if the guild invites are disabled.
owner_id: :class:`int`
The guild owner's ID. Use :attr:`Guild.owner` instead.
unavailable: :class:`bool`
Expand Down Expand Up @@ -1190,7 +1191,7 @@ def created_at(self) -> datetime.datetime:

@property
def invites_disabled(self) -> bool:
"""Returns a boolean indicating if the guild invites are disabled."""
"""A boolean indicating whether the guild invites are disabled."""
return "INVITES_DISABLED" in self.features

def get_member_named(self, name: str, /) -> Member | None:
Expand Down Expand Up @@ -4509,7 +4510,7 @@ def entitlements(
exclude_ended=exclude_ended,
)

def get_sound(self, sound_id: int) -> Soundboard | None:
def get_sound(self, sound_id: int) -> SoundboardSound | None:
"""Returns a sound with the given ID.

.. versionadded :: 2.7
Expand Down
4 changes: 1 addition & 3 deletions discord/raw_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from .soundboard import PartialSoundboardSound, SoundboardSound
from .state import ConnectionState
from .threads import Thread
from .types.channel import VoiceChannelEffectSendEvent as VoiceChannelEffectSend
from .types.raw_models import (
AuditLogEntryEvent,
)
Expand All @@ -65,9 +66,6 @@
ThreadMembersUpdateEvent,
ThreadUpdateEvent,
TypingEvent,
)
from .types.raw_models import VoiceChannelEffectSendEvent as VoiceChannelEffectSend
from .types.raw_models import (
VoiceChannelStatusUpdateEvent,
)
from .user import User
Expand Down
2 changes: 1 addition & 1 deletion docs/api/data_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dynamic attributes in mind.

.. attributetable:: MediaGalleryItem

.. autoclass:: SelectOption
.. autoclass:: MediaGalleryItem
:members:

.. attributetable:: UnfurledMediaItem
Expand Down
12 changes: 12 additions & 0 deletions docs/api/enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2572,3 +2572,15 @@ of :class:`enum.Enum`.
.. attribute:: large

The separator uses large padding.

.. class:: SortOrder

Used to represent the default sort order for posts in :class:`ForumChannel` and :class:`MediaChannel`.

.. attribute:: latest_activity

Sort by latest activity.

.. attribute:: creation_date

Sort by post creation date.
2 changes: 1 addition & 1 deletion docs/api/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ Interactions
:members:

Message Components
------------
------------------

.. attributetable:: Component

Expand Down
2 changes: 1 addition & 1 deletion docs/ext/bridge/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ BridgeContext Subclasses
Alias of :data:`typing.Union` [ :class:`.BridgeExtContext`, :class:`.BridgeApplicationContext` ] for typing convenience.

Options
------
-------

Shortcut Decorators
~~~~~~~~~~~~~~~~~~~
Expand Down
Loading