-
Notifications
You must be signed in to change notification settings - Fork 0
Selections
Selections function similarly to how they do in Discord.JS except with a few adjustments to make things generally easier
For more info on select menus and how they're formatted check out this
Selections are classes so they are created like this:
let selection = new wc.Selection({/* stuff */});
// or
let selection = new wc.SelectMenu({/* stuff */});
If you want more info on how selections function this is the code:
Selection = class {
constructor(obj) {
obj.type = 3;
if (obj.id) {
obj.custom_id = obj.id;
}
if (obj.label || obj.text) {
obj.placeholder = (obj.label) ? obj.label : obj.text;
}
if (obj.minimum || obj.min) {
obj.min_values = (obj.minimum) ? obj.minimum : obj.min;
}
if (obj.maximum || obj.max) {
obj.max_values = (obj.maximum) ? obj.maximum : obj.max;
}
return obj;
}
}
For a look at some examples check out the examples folder
If anything with the mod is updated you can look to the releases for info on it
For a look into the development check out the index.js file
This mod is not associated with the creators of Discord, Discord.JS, or Discord.PY this was created out of love for Discord bot development because I wanted to make things easier for people. I do not condone harassment of the original developers and or anyone else involved in the creation of them.
I am not responsible for anything made with this mod and be sure to follow Discord's terms of service and their community guildlines while developing.
Basics
wc.command()
wc.slashCommand()
wc.commandList
wc.slashCommandList
Basics
wc.event()
wc.eventList
wc.commandAction()
wc.buttonAction()
wc.selectionAction()
wc.rowAction()
wc.fetchMessage()
wc.fetchReply()
wc.fetchUser()
wc.fetchGuildUser()
wc.fetchChannel()
wc.fetchGuildChannel()
wc.fetchRole()
wc.fetchGuildRole()
wc.fetchGuild()
wc.parseEmoji()
wc.parseSticker()