Get started
First steps to starting a new discord bot project
Requirements
You must follow these requirements before you begin
- A code editor (preferably Visual Studio Code)
- Requires NodeJs 20.11 or higher installed (or Bun)
- Basic knowledge of programming logic
- Basic knowledge of javascript and typescript
- Basic knowledge of discord.js
Generating the project
To start a new discord bot project you can use the CLI.
Create a new folder for your project and open it on your terminal
Use the command below to start cli
Select Init discord bot project
Enter the project name
Tip
Enter .
to create the project in the current directory and use its name
Select a database preset (optional)
Select extra features (optional)
Select your package manager to install dependencies (optional)
Ready! Your project has been generated and you can start developing your bot.
Setup the project
With the project generated, place your bot token in the .env
file that is at the project root.
After placing the token you can execute the project in development mode using the command below:
After that your bot should be online and you can start development!
Developing your bot
Below are some concepts of this bots base you can use to build modern bots:
Commands
They are essential in any bot to allow users to perform actions and receive messages
Events
They are useful for executing code when certain actions occur in your bot
Responders
It is an exclusive structure of this project that allows the bot to respond to fixed components and modals
Databases
See how to create and configure databases in projects created with this database