From a68a494460120d20bb168c41f869c0f40194ffde Mon Sep 17 00:00:00 2001 From: justin Date: Thu, 13 Mar 2025 18:18:47 -0400 Subject: [PATCH] Update abc.py Signed-off-by: justin --- discord/abc.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index 7bae5a33..a3ae353c 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -1164,7 +1164,8 @@ async def send( reference: Optional[Union[Message, MessageReference]] = None, mention_author: Optional[bool] = None, suppress_embeds: bool = False, - suppress_notifications: bool = False + suppress_notifications: bool = False, + voice_message: bool = False ) -> Message: # sourcery skip: raise-from-previous-error """|coro| @@ -1239,6 +1240,10 @@ async def send( Users will still see a ping-symbol when they are mentioned in the message, or the message is in a dm channel. .. versionadded:: 2.0 + + voice_message: :class:`bool` + Whether to classify the attached file as a voice message, default to :obj:`False` + Voice messages require a single :class:`~discord.File` attachment with `waveform` and `duration` set. Raises -------- @@ -1276,11 +1281,12 @@ async def send( else: reference = MISSING - if suppress_embeds or suppress_notifications: + if suppress_embeds or suppress_notifications or voice_message: from .flags import MessageFlags flags = MessageFlags._from_value(0) flags.suppress_embeds = suppress_embeds flags.suppress_notifications = suppress_notifications + flags.is_voice_message = voice_message else: flags = MISSING