This is a discord.js bot template with a components system.
It is written in TypeScript, and uses @discordjs/core
.
Out of the box, the template only adds a ping and some example commands. Database support is also not included by default, and can be manually added.
Typically when developing Discord bots, we place handlers, events, commands, interactions, etc. into their own respective folders.
The components system creates a more organized way to store all related events, commands and other interactions in their own folder (see components).
The template comes with interaction utilities, allowing you to handle user input with ease (see example).
The template comes with subcommand utilities, allowing you to create commands with subcommands and subcommand groups with ease (see example).
The template comes with stateful modals & message components, allowing you to handle simple state between interactions with ease (see example).
- Make a copy of the
.env.example
file - Name the new copy
.env
- Configure the file
npm run lint
- Lint your code with Prettiernpm run format
- Format your code with Prettiernpm run build
- Build your code with the TypeScript compilernpm run deploy
- Deploy commands to Discordnpm run start
- Start your bot