View Source Nostrum.Api.Poll (Nostrum v0.10.4)
Module for interacting with the Discord API's poll endpoints.
Summary
Functions
Get voters for the provided answer on the poll attached to the provided message.
Expire (close voting on) a poll before the scheduled end time.
Functions
Link to this function
answer_voters(channel_id, message_id, answer_id, params \\ [])
View Source (since 0.10.1)Get voters for the provided answer on the poll attached to the provided message.
If successful, returns {:ok, users}
. Otherwise, returns Nostrum.Api.error/0
.
The optional params
are after
, the user ID to query after, absent by default,
and limit
, the max number of users to return, 1-100, 25 by default. Results are
sorted by Discord user snowflake (ID) in ascending order.
@spec expire(Nostrum.Struct.Channel.id(), Nostrum.Struct.Message.id()) :: Nostrum.Api.error() | {:ok, Nostrum.Struct.Message.t()}
Expire (close voting on) a poll before the scheduled end time.
Returns the original message containing the poll.