View Source Nostrum.Struct.Message.Poll.Results (Nostrum v0.10.0)

A struct representing the results of a poll.

Summary

Types

A list of objects representing the counts for each of the potential answers in the poll.

A flag on whether the poll has finished counting.

t()

Types

@type answer_counts() :: [%{id: integer(), count: integer(), me_voted: boolean()}]

A list of objects representing the counts for each of the potential answers in the poll.

The id property of each item corresponds to the answer_id of the poll answers. If an option is not present in this list, then there were no votes for that answer.

@type is_finalized() :: boolean()

A flag on whether the poll has finished counting.

If this is set to true, the counts are guaranteed to be accurate from Discord.

@type t() :: %Nostrum.Struct.Message.Poll.Results{
  answer_counts: answer_counts(),
  is_finalized: is_finalized()
}