mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
36 lines
719 B
JavaScript
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() {}
|
|
} |