Setup .env
Configuration
In the root directory of our project we need to have a plain text file that contains variables for configuring our application.
We'll use the default .env
filename so that when we call dotenv.config()
before our app starts it will make these variables available as "environment variables" under the process.env
object.
Make sure you add ".env" to your .gitignore file to prevent your token and other credentials from being exposed in your git repository remote(s).
Variables
Variable Name | Description |
| Discord bot token. This is a random string generated by authorizing the bot. Click here for more information. |
| Your discord user id. This is used for super user privileges for some modules. |
| MySQL hostname (most likely |
| MySQL port number (most likely 3306). |
| MySQL username you setup when installing. |
| MySQL password you setup when installing. |
| MySQL database name for your bot (you will have to create this). |
| The first character of a message that maps to this module such as |
| Name of the role that has administrator privileges such as managing tags, answering questions, etc. |
| When questions are added or managed messages will be sent to this channel id. |
Last updated