aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/bot.js b/bot.js
index 70a56e5..414eb76 100644
--- a/bot.js
+++ b/bot.js
@@ -6,7 +6,8 @@ const fs = require('fs');
bot.commands = new Discord.Collection();
bot.aliases = new Discord.Collection();
bot.categories = new Discord.Collection();
-
+bot.queue = new Discord.Collection();
+bot.plugins = { music : require('./Plugins/Music.js') };
cmdLoader();
async function cmdLoader() {
@@ -71,4 +72,16 @@ fs.readdir('./events', (err, files) => {
console.log('\n');
});
-bot.login(config.token);
+
+const { PlayerManager } = require('discord.js-lavalink');
+const nodes = [
+ { 'host': 'localhost', 'port': 6547, 'region': 'us', 'shard': 1, 'password': 'iamaverysecurepassword' },
+];
+
+process.on('unhandledRejection', (err) => {
+ console.error(err.stack);
+});
+
+bot.login(config.token).then(() => {
+ bot.player = new PlayerManager(bot, nodes, { user: bot.user.id, shards: 1, password: 'iamaverysecurepassword' });
+});