logo

Constatic

Discord Bot BaseConventions

Structure

How folders are structured

Folder Structure

If you follow the structure established by this project, it will be very easy to get support anywhere, not to mention that your code will be organized and highly semantic.

Below is an overview of how the project is structured:

.env
package.json
tsconfig.json
README.md
settings.json

All the following folders are located inside src

Discord Folder

The structures of this base, such as the functions createCommand, createEvent, and createResponder, need to be in a file that is imported before the bot starts. Everything in the src/discord folder and its subfolders will be imported before the bot starts, thus loading all the structures.

Settings Folder

This folder contains essential files for the project's functionality, such as environment variable schema definitions, global variables, error handlers, typing files, and more.

Database Folder

This folder contains all the configuration and models for the database chosen during the project's setup. Learn more here

Server Folder

This is where the HTTP request server chosen during the project's setup is initialized. Learn more here

On this page