From ff42213a13b41cc029c4c44aa446e89940a068d6 Mon Sep 17 00:00:00 2001 From: MARCROCK22 <57925328+MARCROCK22@users.noreply.github.com> Date: Mon, 22 Apr 2024 18:43:25 -0400 Subject: [PATCH] fix: poll typings --- src/builders/Poll.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 };