Files
custom_discordjs/structures/interactions/Button.js
T
2023-04-08 16:33:58 -04:00

36 lines
719 B
JavaScript

// https://github.com/discordjs/discord-api-types/blob/main/rest/v10/index.ts
// https://discord.com/developers/docs/interactions/message-components
import {MessageButtonStyles} from './ButtonStyles.js';
export class Button {
/** @type {MessageButtonStyles} */
style;
/** @type {String} */
label;
/** @type {{name: String, id: String, animated: Boolean}} */
emoji;
/** @type {String} */
custom_id;
/** @type {String} */
url;
/** @type {String} */
label;
/** @type {Boolean} */
disabled;
toObj() {
var obj = {type: 2};
for (const i in this) {
obj[i] = this[i];
}
return obj;
}
constructor() {}
}