logo

Constatic

Discord Bot Base

Get started

First steps to starting a new discord bot project

Requirements

You must follow these requirements before you begin

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

npx constatic@latest

Select the first option: Init discord bot project

You will be asked a few questions to prepare your project:

- Project name (path to folder)
- Database (optional)
- Extra resources (optional)
- Install dependencies (optional)

Once you have answered everything, your project will be generated and you can start developing.

Setup the project

With the project generated, place your bot token in the .env file that is at the project root.

.env
BOT_TOKEN=yourtoken

After placing the token you can execute the project in development mode using the command below:

npm run dev

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:

On this page