mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
20 lines
441 B
JavaScript
20 lines
441 B
JavaScript
|
|
export class MessageActionRow {
|
|
/** @type {Object[]} */
|
|
components;
|
|
|
|
addComponent(comp) {
|
|
if (this.components.length > 5) throw "MAXIMUM SIZE REACHED!";
|
|
this.components.push(comp);
|
|
}
|
|
|
|
toObj() {
|
|
const o = {type: 1, components: []};
|
|
for (const k of this.components) {
|
|
o.components.push(k.toObj());
|
|
}
|
|
return o;
|
|
}
|
|
|
|
constructor() { this.components = []; }
|
|
} |