Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5c60925
📝 Add missing docs to .respond methods
ToothyDev Jan 9, 2026
cbcc245
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 9, 2026
fce0c58
Add overloads to type method properly (interaction)
ToothyDev Jan 10, 2026
75a338c
Add overloads to type method properly (ApplicationContext)
ToothyDev Jan 10, 2026
f0aabcc
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 10, 2026
ae1be07
Adjust typing and make it a transparent passthrough
ToothyDev Jan 10, 2026
8870c20
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 10, 2026
b725e9e
Add typing for args/kwargs
ToothyDev Jan 11, 2026
67127fd
Adjust changelog
ToothyDev Jan 11, 2026
cfb0e3a
Merge branch 'master' into fix/document_respond_parameters
ToothyDev Jan 11, 2026
638bbf6
🐛 Make optional params optional
ToothyDev Jan 11, 2026
49262c9
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 11, 2026
c2713db
Update changelog
ToothyDev Jan 13, 2026
573370d
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2026
28b161f
✨ Add new parameters initially
ToothyDev Jan 13, 2026
f4f76b2
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2026
aed9ed0
📝 Fix up docs a bit
ToothyDev Jan 13, 2026
deb1611
Change overloads
ToothyDev Jan 14, 2026
50fa2a1
Apply code change requests
ToothyDev Jan 14, 2026
65adca3
Merge branch 'fix/document_respond_parameters' into feat/suppress_fla…
ToothyDev Jan 14, 2026
5200e8c
Add suppress kwargs where I forgot them
ToothyDev Jan 14, 2026
51f036b
Merge branch 'master' into fix/document_respond_parameters
ToothyDev Jan 15, 2026
c2646ec
Merge branch 'master' into fix/document_respond_parameters
ToothyDev Jan 19, 2026
183f987
Merge branch 'fix/document_respond_parameters' into feat/suppress_fla…
ToothyDev Jan 19, 2026
39c56f3
Merge branch 'master' into feat/suppress_flags_for_responses
ToothyDev Jan 25, 2026
96336b7
Add missing docs
ToothyDev Jan 25, 2026
1e1b0f6
Make doc text equal
ToothyDev Jan 25, 2026
7904484
Fix merge request mistakes
ToothyDev Jan 25, 2026
baedbc5
Fix bool / poll mistype
ToothyDev Jan 25, 2026
27bb7e1
Deprecate old parameter and replace it with new one
ToothyDev Jan 25, 2026
9f38124
Update changelog
ToothyDev Jan 25, 2026
7d75f2d
Apply code change requests
ToothyDev Jan 25, 2026
26287e4
Apply suggestions from code review
ToothyDev Jan 25, 2026
1f3f4a4
Fix intendation
ToothyDev Jan 25, 2026
fd55987
oops
ToothyDev Jan 25, 2026
70878d6
Make changelog more wordy but more correct
ToothyDev Jan 26, 2026
2364897
Merge remote-tracking branch 'upstream/master' into feat/suppress_fla…
ToothyDev Jan 26, 2026
625ff78
Apply suggestions from code review
ToothyDev Jan 26, 2026
1a3f3cb
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 26, 2026
6a7c54e
Merge branch 'master' into feat/suppress_flags_for_responses
ToothyDev Jan 28, 2026
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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ These changes are available on the `master` branch, but have not yet been releas

- Added `.extension` attribute to the `AppEmoji` and `GuildEmoji` classes.
([#3055](https://github.com/Pycord-Development/pycord/pull/3055))
- Added `silent` parameter to all methods that send messages, including
`ApplicationContext.respond`, `Interaction.respond` and
`InteractionResponse.send_message`.
([#3062](https://github.com/Pycord-Development/pycord/pull/3062))
- Added `suppress_embeds` parameter to all methods that send messages, replacing
`suppress`, including `ApplicationContext.respond`, `Interaction.respond` and
`InteractionResponse.send_message`.
([#3062](https://github.com/Pycord-Development/pycord/pull/3062))

### Changed

Expand Down Expand Up @@ -43,6 +51,12 @@ These changes are available on the `master` branch, but have not yet been releas
method were not type-hinted as optional.
([#3061](https://github.com/Pycord-Development/pycord/pull/3061))

### Deprecated

- Deprecated the `suppress` parameter in all applicable message-related methods. Does
not affect any functions related to voice.
([#3062](https://github.com/Pycord-Development/pycord/pull/3062))

### Removed

- Removed the guild creation and ownership-related methods and arguments due to updated
Expand Down
19 changes: 18 additions & 1 deletion discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from .role import Role
from .scheduled_events import ScheduledEvent
from .sticker import GuildSticker, StickerItem
from .utils import warn_deprecated
from .voice_client import VoiceClient, VoiceProtocol

__all__ = (
Expand Down Expand Up @@ -1358,6 +1359,7 @@ async def send(
view: BaseView = ...,
poll: Poll = ...,
suppress: bool = ...,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message: ...

Expand All @@ -1379,6 +1381,7 @@ async def send(
view: BaseView = ...,
poll: Poll = ...,
suppress: bool = ...,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message: ...

Expand All @@ -1400,6 +1403,7 @@ async def send(
view: BaseView = ...,
poll: Poll = ...,
suppress: bool = ...,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message: ...

Expand All @@ -1421,6 +1425,7 @@ async def send(
view: BaseView = ...,
poll: Poll = ...,
suppress: bool = ...,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message: ...

Expand All @@ -1443,6 +1448,7 @@ async def send(
view=None,
poll=None,
suppress=None,
suppress_embeds=None,
silent=None,
):
"""|coro|
Expand Down Expand Up @@ -1521,6 +1527,12 @@ async def send(
.. versionadded:: 2.0
suppress: :class:`bool`
Whether to suppress embeds for the message.

.. deprecated:: 2.8
suppress_embeds: :class:`bool`
Whether to suppress embeds for the message.

.. versionadded:: 2.8
silent: :class:`bool`
Whether to suppress push and desktop notifications for the message.

Expand Down Expand Up @@ -1568,8 +1580,13 @@ async def send(
)
embeds = [embed.to_dict() for embed in embeds]

if suppress is not None:
warn_deprecated("suppress", "suppress_embeds", "2.8")
if suppress_embeds is None:
suppress_embeds = suppress

flags = MessageFlags(
suppress_embeds=bool(suppress),
suppress_embeds=bool(suppress_embeds),
suppress_notifications=bool(silent),
)

Expand Down
4 changes: 4 additions & 0 deletions discord/commands/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ async def respond(
files: list[File] | None = None,
poll: Poll | None = None,
delete_after: float | None = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> Interaction | WebhookMessage: ...

@overload
Expand All @@ -309,6 +311,8 @@ async def respond(
files: list[File] | None = None,
poll: Poll | None = None,
delete_after: float | None = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> Interaction | WebhookMessage: ...

@discord.utils.copy_doc(Interaction.respond)
Expand Down
46 changes: 43 additions & 3 deletions discord/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from .object import Object
from .permissions import Permissions
from .user import User
from .utils import warn_deprecated
from .webhook.async_ import (
Webhook,
WebhookMessage,
Expand Down Expand Up @@ -525,7 +526,8 @@ async def edit_original_response(
view: BaseView | None = MISSING,
allowed_mentions: AllowedMentions | None = None,
delete_after: float | None = None,
suppress: bool = False,
suppress: bool | None = None,
suppress_embeds: bool = None,
) -> InteractionMessage:
"""|coro|

Expand Down Expand Up @@ -567,6 +569,12 @@ async def edit_original_response(
suppress: :class:`bool`
Whether to suppress embeds for the message.

.. deprecated:: 2.8
suppress_embeds: :class:`bool`
Whether to suppress embeds for the message.

.. versionadded:: 2.8

Returns
-------
:class:`InteractionMessage`
Expand All @@ -585,6 +593,12 @@ async def edit_original_response(
"""

previous_mentions: AllowedMentions | None = self._state.allowed_mentions
if suppress is not None:
warn_deprecated("suppress", "suppress_embeds", "2.8")
if suppress_embeds is None:
suppress_embeds = suppress
elif suppress_embeds is None:
suppress_embeds = False
params = handle_message_parameters(
content=content,
file=file,
Expand All @@ -595,7 +609,7 @@ async def edit_original_response(
view=view,
allowed_mentions=allowed_mentions,
previous_allowed_mentions=previous_mentions,
suppress=suppress,
suppress=suppress_embeds,
)
if view and self.message:
self._state.prevent_view_updates_for(self.message.id)
Expand Down Expand Up @@ -712,6 +726,8 @@ async def respond(
files: list[File] | None = None,
poll: Poll | None = None,
delete_after: float | None = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> Interaction | WebhookMessage: ...

@overload
Expand All @@ -727,6 +743,8 @@ async def respond(
files: list[File] | None = None,
poll: Poll | None = None,
delete_after: float | None = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> Interaction | WebhookMessage: ...

async def respond(self, *args, **kwargs) -> Interaction | WebhookMessage:
Expand Down Expand Up @@ -767,6 +785,14 @@ async def respond(self, *args, **kwargs) -> Interaction | WebhookMessage:
The poll to send.

.. versionadded:: 2.6
silent: :class:`bool`
Whether to suppress push and desktop notifications for the message.

.. versionadded:: 2.8
suppress_embeds: :class:`bool`
Whether to suppress embeds for the message.

.. versionadded:: 2.8

Returns
-------
Expand Down Expand Up @@ -1024,6 +1050,8 @@ async def send_message(
files: list[File] | None = None,
poll: Poll | None = None,
delete_after: float | None = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> Interaction:
"""|coro|

Expand Down Expand Up @@ -1061,6 +1089,14 @@ async def send_message(
The poll to send.

.. versionadded:: 2.6
silent: :class:`bool`
Whether to suppress push and desktop notifications for the message.

.. versionadded:: 2.8
suppress_embeds: :class:`bool`
Whether to suppress embeds for the message.

.. versionadded:: 2.8

Returns
-------
Expand Down Expand Up @@ -1099,7 +1135,11 @@ async def send_message(
if content is not None:
payload["content"] = str(content)

flags = MessageFlags(ephemeral=ephemeral)
flags = MessageFlags(
ephemeral=ephemeral,
suppress_notifications=silent,
suppress_embeds=suppress_embeds,
)

if view:
payload["components"] = view.to_components()
Expand Down
20 changes: 18 additions & 2 deletions discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
from .reaction import Reaction
from .sticker import StickerItem
from .threads import Thread
from .utils import MISSING, escape_mentions, find
from .utils import MISSING, escape_mentions, find, warn_deprecated

if TYPE_CHECKING:
from .abc import (
Expand Down Expand Up @@ -1737,6 +1737,7 @@ async def edit(
files: list[File] | None = ...,
attachments: list[Attachment] = ...,
suppress: bool = ...,
suppress_embeds: bool = ...,
delete_after: float | None = ...,
allowed_mentions: AllowedMentions | None = ...,
view: BaseView | None = ...,
Expand All @@ -1751,6 +1752,7 @@ async def edit(
files: list[Sequence[File]] = MISSING,
attachments: list[Attachment] = MISSING,
suppress: bool = MISSING,
suppress_embeds: bool = MISSING,
delete_after: float | None = None,
allowed_mentions: AllowedMentions | None = MISSING,
view: BaseView | None = MISSING,
Expand Down Expand Up @@ -1789,6 +1791,15 @@ async def edit(
all the embeds if set to ``True``. If set to ``False``
this brings the embeds back if they were suppressed.
Using this parameter requires :attr:`~.Permissions.manage_messages`.

.. deprecated: 2.8
suppress_embeds: :class:`bool`
Whether to suppress embeds for the message. This removes
all the embeds if set to ``True``. If set to ``False``
this brings the embeds back if they were suppressed.
Using this parameter requires :attr:`~.Permissions.manage_messages`.

.. versionadded:: 2.8
delete_after: Optional[:class:`float`]
If provided, the number of seconds to wait in the background
before deleting the message we just edited. If the deletion fails,
Expand Down Expand Up @@ -1837,7 +1848,12 @@ async def edit(
flags = MessageFlags._from_value(self.flags.value)

if suppress is not MISSING:
flags.suppress_embeds = suppress
warn_deprecated("suppress", "suppress_embeds", "2.8")
if suppress_embeds is MISSING:
suppress_embeds = suppress

if suppress_embeds is not MISSING:
flags.suppress_embeds = suppress_embeds

if allowed_mentions is MISSING:
if (
Expand Down
32 changes: 29 additions & 3 deletions discord/webhook/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
"PartialWebhookGuild",
)

from ..utils import warn_deprecated

_log = logging.getLogger(__name__)

if TYPE_CHECKING:
Expand Down Expand Up @@ -646,8 +648,10 @@ def handle_message_parameters(
applied_tags: list[Snowflake] = MISSING,
allowed_mentions: AllowedMentions | None = MISSING,
previous_allowed_mentions: AllowedMentions | None = None,
suppress: bool = False,
suppress: bool | None = None,
thread_name: str | None = None,
suppress_embeds: bool = None,
silent: bool = False,
) -> ExecuteWebhookParameters:
if files is not MISSING and file is not MISSING:
raise TypeError("Cannot mix file and files keyword arguments.")
Expand All @@ -667,10 +671,16 @@ def handle_message_parameters(
_attachments = []
if attachments is not MISSING:
_attachments = [a.to_dict() for a in attachments]

if suppress is not None:
warn_deprecated("suppress", "suppress_embeds", "2.8")
if suppress_embeds is None:
suppress_embeds = suppress
elif suppress_embeds is None:
suppress_embeds = False
flags = MessageFlags(
suppress_embeds=suppress,
suppress_embeds=suppress_embeds,
ephemeral=ephemeral,
suppress_notifications=silent,
)

if view is not MISSING:
Expand Down Expand Up @@ -1661,6 +1671,8 @@ async def send(
applied_tags: list[Snowflake] = MISSING,
wait: Literal[True],
delete_after: float = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> WebhookMessage: ...

@overload
Expand All @@ -1684,6 +1696,8 @@ async def send(
applied_tags: list[Snowflake] = MISSING,
wait: Literal[False] = ...,
delete_after: float = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> None: ...

async def send(
Expand All @@ -1706,6 +1720,8 @@ async def send(
applied_tags: list[Snowflake] = MISSING,
wait: bool = False,
delete_after: float = None,
silent: bool = False,
suppress_embeds: bool = False,
) -> WebhookMessage | None:
"""|coro|

Expand Down Expand Up @@ -1786,6 +1802,14 @@ async def send(
The poll to send.

.. versionadded:: 2.6
silent: :class:`bool`
Whether to suppress push and desktop notifications for the message.

.. versionadded:: 2.8
suppress_embeds: :class:`bool`
Whether to suppress embeds for the message.

.. versionadded:: 2.8

Returns
-------
Expand Down Expand Up @@ -1872,6 +1896,8 @@ async def send(
allowed_mentions=allowed_mentions,
previous_allowed_mentions=previous_mentions,
thread_name=thread_name,
silent=silent,
suppress=suppress_embeds,
)
adapter = async_context.get()
thread_id: int | None = None
Expand Down
Loading