Folder Structures

How to properly setup file structure and environment variables.

The first thing we are going is setup file structures and define our token variable. For this, we will be using a .json file.

Setting up File Structure

The first thing we will be doing is creating a source file to store all of our bot commands, events, and more.

Now create this folder and name is source, as stated here.

Environment Variables

Now inside your ROOT directory (not the source folder you just created), create a file and name it default.json Just that, nothing else.

And now inside the default.json file, you want to add an entree called token. This is where you will store your bot token

The line should look as follows:

{
  "token": "Paste Token Here"
}

Obviously replacing the "Paste Token Here" with the actual token of your bot.

Save this file and continue following the tutorial.

Main File

Last updated