From 91f958cbac9185ac84d98984b62538e5a2ff5f26 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sun, 22 Feb 2026 16:46:24 -0500 Subject: [PATCH] Add missing wait_for overloads for soundboard & voice effects --- discord/client.py | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/discord/client.py b/discord/client.py index 88c390be0..2d78fc2f4 100644 --- a/discord/client.py +++ b/discord/client.py @@ -88,7 +88,7 @@ if TYPE_CHECKING: from .abc import Messageable, PrivateChannel, Snowflake, SnowflakeTime from .app_commands import Command, ContextMenu from .automod import AutoModAction, AutoModRule - from .channel import DMChannel, GroupChannel + from .channel import DMChannel, GroupChannel, VoiceChannelEffect from .ext.commands import AutoShardedBot, Bot, Context, CommandError from .guild import GuildChannel from .integrations import Integration @@ -1753,6 +1753,38 @@ class Client: timeout: Optional[float] = ..., ) -> Tuple[ScheduledEvent, User]: ... + @overload + async def wait_for( + self, + event: Literal['scheduled_event_update'], + /, + *, + check: Optional[Callable[[ScheduledEvent, ScheduledEvent], bool]] = ..., + timeout: Optional[float] = ..., + ) -> Tuple[ScheduledEvent, ScheduledEvent]: ... + + # Soundboard + + @overload + async def wait_for( + self, + event: Literal['soundboard_sound_create', 'soundboard_sound_delete'], + /, + *, + check: Optional[Callable[[SoundboardSound], bool]] = ..., + timeout: Optional[float] = ..., + ) -> SoundboardSound: ... + + @overload + async def wait_for( + self, + event: Literal['soundboard_sound_update'], + /, + *, + check: Optional[Callable[[SoundboardSound, SoundboardSound], bool]] = ..., + timeout: Optional[float] = ..., + ) -> Tuple[SoundboardSound, SoundboardSound]: ... + # Stages @overload @@ -1859,6 +1891,16 @@ class Client: timeout: Optional[float] = ..., ) -> Tuple[Member, VoiceState, VoiceState]: ... + @overload + async def wait_for( + self, + event: Literal['voice_channel_effect'], + /, + *, + check: Optional[Callable[[VoiceChannelEffect], bool]] = ..., + timeout: Optional[float] = ..., + ) -> VoiceChannelEffect: ... + # Polls @overload