diff --git a/src/builders/Poll.ts b/src/builders/Poll.ts index 9410404..2c62912 100644 --- a/src/builders/Poll.ts +++ b/src/builders/Poll.ts @@ -4,13 +4,11 @@ import { throwError } from '..'; import { resolvePartialEmoji } from '../structures/extra/functions'; export class PollBuilder { - constructor( - public data: DeepPartial & { answers: { poll_media: APIPollMedia }[] }> = {}, - ) { + constructor(public data: DeepPartial = {}) { this.data.layout_type = PollLayoutType.Default; } - addAnswers(...answers: RestOrArray) { + addAnswers(...answers: RestOrArray) { this.data.answers = (this.data.answers ?? []).concat( answers.flat().map(x => ({ poll_media: this.resolvedPollMedia(x) })), ); @@ -52,4 +50,4 @@ export class PollBuilder { } } -export type PollMedia = { text?: string; emoji?: EmojiResolvable }; +export type PollMedia = Omit & { emoji?: EmojiResolvable };