aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-02-25 21:58:31 -0500
committerUnknown <jtsshieh@outlook.com>2018-02-25 21:58:31 -0500
commit2b83e842fea1c9cab7abbe45154a1f140e26f990 (patch)
treed5632015dbc0f28a56ee1295d0d32d92378b6204 /bot.js
parent6d17517b4543afbf5100b55619efc8a6d8f3c754 (diff)
downloadPokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.tar.gz
PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.tar.bz2
PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.zip
Basic music commands
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' });
+});