-
Notifications
You must be signed in to change notification settings - Fork 0
Event Basics
Events work differently than Discord.JS because they have their own list of custom events such as button and select menu events
For a full list of events go here or use wc.eventList
Events while working differently are cross compatible with Discord.JS' client.on() function the only main difference is the fact that wc has custom events.
In this example it logs the bot's username and ID
// discord.js
client.on("ready", async (ctx) => {
console.log(`Logged in as @${ctx.user.username} (${ctx.user.id})`);
});
// willclient
wc.event("ready", async (ctx) => {
console.log(`Logged in as @${ctx.user.username} (${ctx.user.id})`);
});
Events can be used to do things like respond to buttons like in this example
wc.event("buttonPress", async (ctx) => {
if (ctx.customId == "accept") {
ctx.reply("Accepted!")
}
});
// or
wc.buttonAction( async (ctx) => {
if (ctx.customId == "accept") {
ctx.reply("Accepted!")
}
});
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()