Buttons - shysolocup/willclient GitHub Wiki
Buttons function similarly to how they do in Discord.JS except with a few adjustments to make things generally easier
For more info on buttons and how they're formatted check out this
Buttons are classes so they are created like this:
let button = new wc.Button({/* stuff */});
Now we'll go over the new additions
wc has built in button styles for you to use
the styles are primary, secondary, success, danger, and link
{
style: "primary"
}
If you want more info on how buttons function this is the code:
Button = class {
constructor(obj) {
obj.type = 2;
if (obj.id) {
obj.custom_id = obj.id;
}
if (obj.style) {
obj.style = this.buttonStyle(obj.style);
}
return obj;
}
}