๐ Have a see inside
There is a lot of files inside sources/modules/templates but let's see what it all adds up to.
๐ Handlersโ
The purpose of these files is to manage interactions, events, database elements and tasks.
Buttonsโ
buttons โ for your buttons
Channelsโ
channels โ 3 types of files are possible :
- those ending with
create.jswill be automatically launched when a channel is created - those ending with
delete.jswill be automatically launched when a channel is deleted - those ending with
update.jswill be automatically launched when a channel is updated
Commandsโ
commands โ for your commands
Membersโ
members โ 3 types of files are possible :
- those ending with
join.jswill be automatically launched when a member joins a guild - those ending with
leave.jswill be automatically launched when a member leaves a guild - those ending with
update.jswill be automatically launched when a member is updated on a guild
Menusโ
menus โ for your select menus
Messagesโ
messages โ 3 types of files are possible :
- those ending with
create.jswill be automatically launched when a message is created - those ending with
delete.jswill be automatically launched when a message is deleted - those ending with
update.jswill be automatically launched when a message is updated
Modalsโ
modals โ for your modals (forms)
Modelsโ
models โ models are a quick and easy way of creating objects linked to your database; please read the documentation
Presencesโ
presences โ to check presences updates (status & activities of users and bots)
Reactionsโ
reactions โ 2 types of files are possible :
- those ending with
add.jswill be automatically launched when a reaction is added to a message - those ending with
remove.jswill be automatically launched when a reaction is removed from a message
Tasksโ
tasks โ define recurring tasks such as an automatic message or checking for updates
โน๏ธ Reminderโ
Each folder can contain as many files as necessary, please take care for folders that manage several events (for example: create, update and delete events) to add the extension corresponding to the event in question (channel_create.js, channel_update.js, channel_delete.js)
๐งฐ Utilsโ
utils โ You will notice that there is a utils folder, which is not automatically imported by the system, it is a totally optional folder which can have any other name (it doesn't matter) in which you save functions, classes or anything else that can be used in your module