diff --git a/README.md b/README.md index 986806f..6f128b3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Codey Bot +## Required environment variables +- `BOT_TOKEN`: the token found in the bot user account. +- `NOTIF_CHANNEL_ID`: the ID of the channel the bot will send system notifications to. + ## Running the bot locally 1. Run `yarn` to install dependencies. -1. Add the bot token in your `.env` file, i.e. add `BOT_TOKEN="YOUR_TOKEN"` in `.env`. +1. Add the required environment variables in a `.env` file in the root directory. 1. Run `yarn dev` to start the bot locally. diff --git a/index.ts b/index.ts index 003a8bd..a0b4393 100644 --- a/index.ts +++ b/index.ts @@ -4,7 +4,7 @@ dotenv.config() import Discord = require('discord.js') import _ = require('lodash') -const NOTIF_CHANNEL_ID = "701335585272627203" +const NOTIF_CHANNEL_ID: string = process.env.NOTIF_CHANNEL_ID const BOT_TOKEN: string = process.env.BOT_TOKEN const BOT_PREFIX = "."