From 2b83e842fea1c9cab7abbe45154a1f140e26f990 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 25 Feb 2018 21:58:31 -0500 Subject: Basic music commands --- bot.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'bot.js') 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' }); +}); -- cgit v1.2.3