Lingo.Api.Poll (Lingo v0.4.2)

Copy Markdown View Source

Polls.

Every function returns {:ok, result}, :ok when Discord sends no body, or {:error, %Lingo.Error{}}. Calls go to the current bot (see Lingo.with_bot/2).

Summary

Functions

Ends a poll early, returning its message.

Lists the users who voted for a poll answer, by its answer_id. Options: :after (a user id) and :limit.

Functions

expire(channel_id, message_id)

Ends a poll early, returning its message.

list_answer_voters(channel_id, message_id, answer_id, opts \\ [])

@spec list_answer_voters(
  Lingo.Api.id(),
  Lingo.Api.id(),
  integer() | String.t(),
  keyword()
) ::
  Lingo.Api.result([Lingo.Type.User.t()])

Lists the users who voted for a poll answer, by its answer_id. Options: :after (a user id) and :limit.