move notif channel id to env var
This commit is contained in:
parent
8df0cace2d
commit
ab5ab15a29
|
@ -1,6 +1,10 @@
|
||||||
# Codey Bot
|
# 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
|
## Running the bot locally
|
||||||
1. Run `yarn` to install dependencies.
|
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.
|
1. Run `yarn dev` to start the bot locally.
|
||||||
|
|
2
index.ts
2
index.ts
|
@ -4,7 +4,7 @@ dotenv.config()
|
||||||
import Discord = require('discord.js')
|
import Discord = require('discord.js')
|
||||||
import _ = require('lodash')
|
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_TOKEN: string = process.env.BOT_TOKEN
|
||||||
const BOT_PREFIX = "."
|
const BOT_PREFIX = "."
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue