mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-06-06 00:07:01 +00:00
Added message select menues (mentionable not available)
This commit is contained in:
@@ -27,10 +27,19 @@ export class Button {
|
||||
toObj() {
|
||||
var obj = {type: 2};
|
||||
for (const i in this) {
|
||||
if (i == "url" && this.style != MessageButtonStyles.LINK) {
|
||||
if (this.url != undefined) throw "CUSTOM ID MISSING";
|
||||
}
|
||||
if (i == "custom_id" && this.style == MessageButtonStyles.LINK) {
|
||||
if (this.custom_id != undefined) throw "BUTTONS OF TYPE \"LINK\" CAN NOT HAVE A CUSTOM ID";
|
||||
}
|
||||
obj[i] = this[i];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
constructor() {}
|
||||
/**
|
||||
* @param {MessageButtonStyles} style
|
||||
*/
|
||||
constructor(style = undefined) { this.style = style; }
|
||||
}
|
||||
Reference in New Issue
Block a user