2023-04-08 16:33:58 -04:00
|
|
|
// 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';
|
2023-04-07 20:35:03 -04:00
|
|
|
|
|
|
|
|
export class Button {
|
2023-04-08 16:33:58 -04:00
|
|
|
/** @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;
|
|
|
|
|
}
|
2023-04-07 20:35:03 -04:00
|
|
|
|
2023-04-08 16:33:58 -04:00
|
|
|
constructor() {}
|
2023-04-07 20:35:03 -04:00
|
|
|
}
|