diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-02-25 21:58:31 -0500 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-02-25 21:58:31 -0500 |
| commit | 2b83e842fea1c9cab7abbe45154a1f140e26f990 (patch) | |
| tree | d5632015dbc0f28a56ee1295d0d32d92378b6204 /bot.js | |
| parent | 6d17517b4543afbf5100b55619efc8a6d8f3c754 (diff) | |
| download | PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.tar.gz PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.tar.bz2 PokeBot-2b83e842fea1c9cab7abbe45154a1f140e26f990.zip | |
Basic music commands
Diffstat (limited to 'bot.js')
| -rw-r--r-- | bot.js | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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' }); +}); |
