Skip to content

Commit

Permalink
Add polls gateway events
Browse files Browse the repository at this point in the history
  • Loading branch information
mifuyutsuki committed May 17, 2024
1 parent 9963ff4 commit 194d4c3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions discord_typings/_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@
'StageInstanceUpdateEvent',
'StageInstanceDeleteData',
'StageInstanceDeleteEvent',
'MessagePollVoteAddData',
'MessagePollVoteAddEvent',
'MessagePollVoteRemoveData',
'MessagePollVoteRemoveEvent',
'DispatchEvent',
'GatewayCommand',
'GatewayEvent',
Expand Down Expand Up @@ -1301,6 +1305,38 @@ class WebhooksUpdateData(TypedDict):
]


# https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add


class MessagePollVoteAddData(TypedDict):
user_id: 'discord_typings.Snowflake'
channel_id: 'discord_typings.Snowflake'
message_id: 'discord_typings.Snowflake'
guild_id: NotRequired['discord_typings.Snowflake']
answer_id: int


MessagePollVoteAddEvent = GenericDispatchEvent[
Literal['MESSAGE_POLL_VOTE_ADD'], MessagePollVoteAddData
]


# https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove


class MessagePollVoteRemoveData(TypedDict):
user_id: 'discord_typings.Snowflake'
channel_id: 'discord_typings.Snowflake'
message_id: 'discord_typings.Snowflake'
guild_id: NotRequired['discord_typings.Snowflake']
answer_id: int


MessagePollVoteRemoveEvent = GenericDispatchEvent[
Literal['MESSAGE_POLL_VOTE_REMOVE'], MessagePollVoteRemoveData
]


# Generalized unions for the typings in this file


Expand Down

0 comments on commit 194d4c3

Please sign in to comment.