class PollAPI

export declare class PollAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the PollAPI class

expirePoll(
channelId: Snowflake
messageId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIMessage>

Immediately expires (i.e. ends) a poll

See also: https://discord.com/developers/docs/resources/poll#expire-poll

getAnswerVoters(
channelId: Snowflake
messageId: Snowflake
answerId: number
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIPollAnswerVotersResult>

Gets the list of users that voted for a specific answer in a poll

See also: https://discord.com/developers/docs/resources/poll#get-answer-voters