REST API endpoints for Discord message polls.
All functions return {:ok, result} or {:error, reason}.
Summary
Functions
Expires a poll before its scheduled end time.
Gets users who voted for a specific poll answer.
Functions
Expires a poll before its scheduled end time.
Returns the updated message containing the expired poll.
Parameters
channel_id- The channel containing the poll messagemessage_id- The message containing the poll
Examples
EDA.API.Poll.expire("123456", "789012")
@spec get_voters(String.t() | integer(), String.t() | integer(), integer(), keyword()) :: {:ok, [map()]} | {:error, term()}
Gets users who voted for a specific poll answer.
Parameters
channel_id- The channel containing the poll messagemessage_id- The message containing the pollanswer_id- The answer ID to get voters for
Options
:after- Snowflake ID for pagination (get users after this ID):limit- Number of users to return (1-100, default: 25)
Examples
EDA.API.Poll.get_voters("123456", "789012", 1)
EDA.API.Poll.get_voters("123456", "789012", 1, after: "111222", limit: 50)