RileCraft / DiscordBot-Template

A bot template with command , event , button , selectmenus , slashcommands handler and error handlers. Made in Discord.JS V14
MIT License
229 stars 59 forks source link

Suggestion Request #16

Closed Kae-Tempest closed 2 years ago

Kae-Tempest commented 2 years ago

It's possible, for you give us more info on you non client event, how it's work ?

it's for custom event, like one streamer up his stream and that mat an event or other thing ?

RileCraft commented 2 years ago

In custom events aka non client events you basically use the old style of creating a event i.e

<anything>.on(<event name>, (args) => {
// Code
})

in the format

module.exports = {
customEvent: true,
run: () => {
// Code i gave above
})

In the run() you can put client, Discord to access them as they are automatically passed through the handler. Everything else you have to do manually