Nostrum.Api.Poll (nostrum v0.11.0-dev)
View SourceModule 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
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.