fix(Interaction): add missing types and fix docs lists (#5762)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
Rodry
2021-06-05 21:05:27 +01:00
committed by GitHub
parent 2901fd595b
commit 1d57754d46
2 changed files with 8 additions and 7 deletions

View File

@@ -826,19 +826,19 @@ exports.InteractionResponseTypes = createEnum([
/** /**
* The type of a message component * The type of a message component
* ACTION_ROW * * ACTION_ROW
* BUTTON * * BUTTON
* @typedef {string} MessageComponentType * @typedef {string} MessageComponentType
*/ */
exports.MessageComponentTypes = createEnum([null, 'ACTION_ROW', 'BUTTON']); exports.MessageComponentTypes = createEnum([null, 'ACTION_ROW', 'BUTTON']);
/** /**
* The style of a message button * The style of a message button
* PRIMARY * * PRIMARY
* SECONDARY * * SECONDARY
* SUCCESS * * SUCCESS
* DANGER * * DANGER
* LINK * * LINK
* @typedef {string} MessageButtonStyle * @typedef {string} MessageButtonStyle
*/ */
exports.MessageButtonStyles = createEnum([null, 'PRIMARY', 'SECONDARY', 'SUCCESS', 'DANGER', 'LINK']); exports.MessageButtonStyles = createEnum([null, 'PRIMARY', 'SECONDARY', 'SUCCESS', 'DANGER', 'LINK']);

1
typings/index.d.ts vendored
View File

@@ -1328,6 +1328,7 @@ declare module 'discord.js' {
} }
export class MessageComponentInteraction extends Interaction { export class MessageComponentInteraction extends Interaction {
public componentType: MessageComponentType;
public customID: string; public customID: string;
public deferred: boolean; public deferred: boolean;
public message: Message | RawMessage; public message: Message | RawMessage;