Poll
Signature
export declare class Poll extends BaseProperties
11Methods
3Properties
readonly channelId: string;readonly messageId: string;expiryTimestampGetterget expiryTimestamp(): number;expiryAtGetterget expiryAt(): Date;readonly client: UsingClient;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; }; }[];expiry: string;allowMultiselect: boolean;layoutType: PollLayoutType;results?: { isFinalized: boolean; answerCounts: { id: number; count: number; meVoted: boolean; }[]; } | undefined;Methods
constructorConstructorconstructor(client: UsingClient, data: APIPoll, channelId: string, messageId: string);end(): Promise<MessageStructure>;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.