diff --git a/src/builders/Button.ts b/src/builders/Button.ts index bd192c8..0ce5ed1 100644 --- a/src/builders/Button.ts +++ b/src/builders/Button.ts @@ -12,14 +12,6 @@ import { resolvePartialEmoji } from '../structures/extra/functions'; export type ButtonStylesForID = Exclude; -export type ButtonSelect = T extends ButtonStyle.Link - ? Omit, 'setCustomId' | 'setURL' | 'setStyle'> & { - setStyle(style: ButtonStyle.Link): Omit, 'setCustomId' | 'setURL' | 'setStyle'>; - } - : Omit, 'setCustomId' | 'setURL' | 'setStyle'> & { - setStyle(style: ButtonStylesForID): Omit, 'setCustomId' | 'setURL' | 'setStyle'>; - }; - /** * Represents a button component. * @template Type - The type of the button component. @@ -38,10 +30,10 @@ export class Button { * @param id - The custom ID to set. * @returns The modified Button instance. */ - setCustomId(id: string): ButtonSelect { + setCustomId(id: string) { // @ts-expect-error this.data.custom_id = id; - return this as ButtonSelect; + return this; } /** @@ -49,10 +41,10 @@ export class Button { * @param url - The URL to set. * @returns The modified Button instance. */ - setURL(url: string): ButtonSelect { + setURL(url: string) { // @ts-expect-error this.data.url = url; - return this as ButtonSelect; + return this; } /** @@ -87,8 +79,6 @@ export class Button { return this; } - setStyle(style: ButtonStyle.Link): Omit; - setStyle(style: ButtonStylesForID): Omit; setStyle(style: ButtonStyle) { this.data.style = style; return this;