diff --git a/.env.example b/.env.example index ccb930f..f692e16 100644 --- a/.env.example +++ b/.env.example @@ -2,4 +2,9 @@ DISCORD_TOKEN= MONGO_TOKEN= GIPHY_TOKEN= TOPGG_TOKEN= -RADIO= \ No newline at end of file +RADIO= +SPOTIFY_CLIENT_ID= +SPOTIFY_CLIENT_SECRET= +LAVALINK_HOST= +LAVALINK_PASSWORD= +LAVALINK_PORT= \ No newline at end of file diff --git a/src/bot.js b/src/bot.js index cb051b1..13ecdaa 100644 --- a/src/bot.js +++ b/src/bot.js @@ -49,8 +49,8 @@ const client = new Discord.Client({ }); -const clientID = ""; -const clientSecret = ""; +const clientID = process.env.SPOTIFY_CLIENT_ID; +const clientSecret = process.env.SPOTIFY_CLIENT_SECRET; // Lavalink client client.player = new Manager({ @@ -67,9 +67,9 @@ client.player = new Manager({ ], nodes: [ { - host: "", - port: 2333, - password: "", + host: process.env.LAVALINK_HOST, + port: parseInt(process.env.LAVALINK_PORT), + password: process.env.LAVALINK_PASSWORD, }, ], send(id, payload) { diff --git a/src/index.js b/src/index.js index 06f06ef..122981c 100644 --- a/src/index.js +++ b/src/index.js @@ -20,10 +20,10 @@ const manager = new Discord.ShardingManager('./src/bot.js', { token: process.env.DISCORD_TOKEN, respawn: true }); - -const { AutoPoster } = require('topgg-autoposter'); -const poster = AutoPoster(process.env.TOPGG_TOKEN, manager); - +if (process.env.TOPGG_TOKEN) { + const { AutoPoster } = require('topgg-autoposter'); + const poster = AutoPoster(process.env.TOPGG_TOKEN, manager); +} console.clear(); console.log(chalk.blue(chalk.bold(`System`)), (chalk.white(`>>`)), (chalk.green(`Starting up`)), (chalk.white(`...`))) console.log(`\u001b[0m`) @@ -98,4 +98,3 @@ manager.on('shardCreate', shard => { manager.spawn(); - \ No newline at end of file