Change to process.env

This commit is contained in:
Daniel Odendahl Jr
2017-08-13 01:33:56 +00:00
parent e75251b3f9
commit 71c9691419
23 changed files with 46 additions and 248 deletions
+6 -6
View File
@@ -1,10 +1,10 @@
const { token, owner, prefix, invite } = require('./config');
const { TOKEN, OWNER, PREFIX, INVITE } = process.env;
const path = require('path');
const { CommandoClient } = require('discord.js-commando');
const client = new CommandoClient({
commandPrefix: prefix,
owner,
invite,
commandPrefix: PREFIX,
owner: OWNER,
invite: INVITE,
disableEveryone: true,
unknownCommandResponse: false,
disabledEvents: [
@@ -46,7 +46,7 @@ client.registry
client.on('ready', () => {
console.log(`[READY] Shard ${client.shard.id} Logged in as ${client.user.tag} (${client.user.id})!`);
client.user.setGame(`${prefix}help | Shard ${client.shard.id}`);
client.user.setGame(`${PREFIX}help | Shard ${client.shard.id}`);
});
client.on('disconnect', event => {
@@ -112,6 +112,6 @@ client.on('guildDelete', async guild => {
client.setTimeout(() => process.exit(0), 7200000);
client.login(token);
client.login(TOKEN);
process.on('unhandledRejection', console.error);