Skip to content

Commit

Permalink
feat: stricter types for components
Browse files Browse the repository at this point in the history
  • Loading branch information
monbrey committed May 30, 2021
1 parent cf17bc1 commit 4c655b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3320,9 +3320,9 @@ declare module 'discord.js' {

type MessageAdditions = MessageEmbed | MessageAttachment | (MessageEmbed | MessageAttachment)[];

type MessageActionRowComponent = MessageButton;
type MessageActionRowComponent = MessageButton | MessageSelectMenu;

type MessageActionRowComponentOptions = MessageButtonOptions;
type MessageActionRowComponentOptions = MessageButtonOptions | MessageSelectMenuOptions;

interface MessageActionRowOptions extends BaseMessageComponentOptions {
components?: MessageActionRowComponent[] | MessageActionRowComponentOptions[];
Expand Down Expand Up @@ -3352,6 +3352,7 @@ declare module 'discord.js' {
}

type MessageComponent = BaseMessageComponent | MessageActionRow | MessageButton | MessageSelectMenu;

interface MessageComponentInteractionCollectorOptions extends CollectorOptions {
max?: number;
maxComponents?: number;
Expand Down

0 comments on commit 4c655b3

Please sign in to comment.