lilybird
Version:
A bun-first discord api wrapper written in TS
48 lines • 1.34 kB
TypeScript
import type { PollLayoutType } from "#enums";
import type { Emoji } from "./emoji.js";
import type { User } from "./user.js";
export declare namespace Poll {
interface Structure {
question: MediaStructure;
answers: Array<AnswerStructure>;
expiry: string | null;
allow_multiselect: boolean;
layout_type: PollLayoutType;
results?: ResultStructure;
}
interface CreateStructure {
question: MediaStructure;
answers: Array<AnswerStructure>;
duration: number;
allow_multiselect: boolean;
layout_type?: PollLayoutType;
}
interface MediaStructure {
text?: string;
emoji?: Partial<Emoji.Structure>;
}
interface AnswerStructure {
answer_id: number;
poll_media: MediaStructure;
}
interface ResultStructure {
is_finalized: boolean;
answer_counts: Array<AnswerCountStructure>;
}
interface AnswerCountStructure {
id: number;
count: number;
me_voted: boolean;
}
interface AnswerVotersStructure {
users: Array<User.Structure>;
}
interface GatewayPayload {
user_id: string;
channel_id: string;
message_id: string;
guild_id?: string;
answer_id: number;
}
}
//# sourceMappingURL=poll.d.ts.map