Poll

Signature

export declare class Poll extends Base

Properties

question: { text?: string | undefined; emoji?: { id: string | null; name: string | null; animated?: boolean | undefined; } | undefined; };
answers: { answerId: number; pollMedia: { text?: string | undefined; emoji?: { id: string | null; name: string | null; animated?: boolean | undefined; } | undefined; }; }[];
results?: { isFinalized: boolean; answerCounts: { id: number; count: number; meVoted: boolean; }[]; } | undefined;

Methods

getAnswerVoters(id: ValidAnswerId, checkAnswer?: boolean): Promise<UserStructure[]>;
Parameters
id
The ID of the answer whose voters need to be fetched.
checkAnswer
A flag that determines if the answer ID should be validated before fetching voters. Default is `false`. If `true`, the method checks if the answer ID exists in the list of answers and throws an error if not.