added message select menus

This commit is contained in:
ION606
2023-04-08 16:33:58 -04:00
parent f33762036a
commit 410473ecf8
9 changed files with 274 additions and 30 deletions
+20
View File
@@ -0,0 +1,20 @@
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 = []; }
}