View Source Nostrum.Struct.Event.PollVoteChange (Nostrum v0.10.0)

Represents an addition or removal of a vote from a Discord poll.

For polls where multiple answers were selected, one of these events will be fired for each vote.

Summary

Types

ID corresponding to the answer_id in the Nostrum.Struct.Message.Poll.answers/0 list

ID of the channel the vote took place in

ID of the guild the poll is in (unless it is a private channel)

ID of the message the poll was attached to

t()

Event representing a addition or removal of a vote from a poll

Whether the vote was an addition or removal for a vote of the option

ID of the user that has voted

Types

@type answer_id() :: integer()

ID corresponding to the answer_id in the Nostrum.Struct.Message.Poll.answers/0 list

@type channel_id() :: Nostrum.Struct.Channel.id()

ID of the channel the vote took place in

@type guild_id() :: Nostrum.Struct.Guild.id()

ID of the guild the poll is in (unless it is a private channel)

@type message_id() :: Nostrum.Struct.Message.id()

ID of the message the poll was attached to

@type t() :: %Nostrum.Struct.Event.PollVoteChange{
  answer_id: answer_id(),
  channel_id: channel_id(),
  guild_id: guild_id(),
  message_id: message_id(),
  type: type(),
  user_id: user_id()
}

Event representing a addition or removal of a vote from a poll

@type type() :: :add | :remove

Whether the vote was an addition or removal for a vote of the option

@type user_id() :: Nostrum.Struct.User.id()

ID of the user that has voted