Add support for Polls

Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Josh <8677174+bijij@users.noreply.github.com>
Co-authored-by: Trevor Flahardy <75498301+trevorflahardy@users.noreply.github.com>
This commit is contained in:
DA344
2024-05-10 12:14:12 +02:00
committed by GitHub
parent a1206dfde8
commit e43bd8692c
19 changed files with 1097 additions and 1 deletions

View File

@ -78,6 +78,7 @@ if TYPE_CHECKING:
from .channel import VoiceChannel, StageChannel, TextChannel, ForumChannel, CategoryChannel, DMChannel, GroupChannel
from .threads import Thread
from .app_commands.commands import Command, ContextMenu
from .poll import Poll
InteractionChannel = Union[
VoiceChannel,
@ -762,6 +763,7 @@ class InteractionResponse(Generic[ClientT]):
suppress_embeds: bool = False,
silent: bool = False,
delete_after: Optional[float] = None,
poll: Poll = MISSING,
) -> None:
"""|coro|
@ -842,6 +844,7 @@ class InteractionResponse(Generic[ClientT]):
allowed_mentions=allowed_mentions,
flags=flags,
view=view,
poll=poll,
)
http = parent._state.http