Skip to content

Commit

Permalink
Add ComponentTypes to constants because bsian didn't
Browse files Browse the repository at this point in the history
:)

Co-Authored-By: Donovan Daniels <hewwo@yiff.rocks>
  • Loading branch information
JustCat80 and DonovanDMC committed Aug 29, 2021
1 parent ce68e1e commit 0683a9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,11 @@ declare namespace Eris {
USER: 2;
MESSAGE: 3;
};
ComponentTypes: {
ACTION_ROW: 1;
BUTTON: 2;
SELECT_MENU: 3;
};
}

// Selfbot
Expand Down Expand Up @@ -2452,7 +2457,7 @@ declare namespace Eris {
export class ComponentInteraction<T extends PossiblyUncachedTextable = TextableChannel> extends Interaction {
channel: T;
data: {
component_type: 2 | 3;
component_type: Constants["ComponentTypes"][keyof Omit<Constants["ComponentTypes"], "ACTION_ROW">];
custom_id: string;
values?: string[];
};
Expand Down
6 changes: 6 additions & 0 deletions lib/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,9 @@ module.exports.ApplicationCommandTypes = {
USER: 2,
MESSAGE: 3
};

module.exports.ComponentTypes = {
ACTION_ROW: 1,
BUTTON: 2,
SELECT_MENU: 3
};

0 comments on commit 0683a9c

Please sign in to comment.