forked from embee/woomy
Added dev mode
This commit is contained in:
parent
c0111e0943
commit
8b7eb29866
1 changed files with 14 additions and 0 deletions
14
index.js
14
index.js
|
@ -51,6 +51,14 @@ if (fs.existsSync('./config.js') === false) {
|
|||
require('dotenv').config()
|
||||
client.config = require('./config')
|
||||
|
||||
if (process.env.DEV_MODE === 'true') {
|
||||
client.devmode = true
|
||||
client.logger.warn('Running in development mode.')
|
||||
} else {
|
||||
client.devmode = false
|
||||
// load botlist stuff here eventually
|
||||
}
|
||||
|
||||
// Collections that
|
||||
client.commands = new Discord.Collection()
|
||||
client.cooldown = new Discord.Collection()
|
||||
|
@ -104,6 +112,12 @@ const init = async () => {
|
|||
|
||||
// Login into Discord
|
||||
client.login(process.env.TOKEN)
|
||||
|
||||
if(client.devmode === true) {
|
||||
client.login(process.env.DEVTOKEN)
|
||||
} else {
|
||||
client.login(process.env.TOKEN)
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
|
|
Loading…
Reference in a new issue