diff --git a/aethex-bot/bot.js b/aethex-bot/bot.js index 4ebba2f..998686b 100644 --- a/aethex-bot/bot.js +++ b/aethex-bot/bot.js @@ -74,13 +74,22 @@ const LavalinkNodes = [ } ]; +const shoukakuOptions = { + moveOnDisconnect: false, + resumable: true, + resumableTimeout: 60, + reconnectTries: 5, + restTimeout: 30000, + reconnectInterval: 5 +}; + const kazagumo = new Kazagumo({ defaultSearchEngine: 'youtube', send: (guildId, payload) => { const guild = client.guilds.cache.get(guildId); if (guild) guild.shard.send(payload); } -}, new Connectors.DiscordJS(client), LavalinkNodes); +}, new Connectors.DiscordJS(client), LavalinkNodes, shoukakuOptions); kazagumo.shoukaku.on('ready', (name) => { console.log(`[Music] Lavalink node "${name}" connected`); diff --git a/aethex-bot/commands/music.js b/aethex-bot/commands/music.js index 729de3c..e900dce 100644 --- a/aethex-bot/commands/music.js +++ b/aethex-bot/commands/music.js @@ -98,8 +98,9 @@ module.exports = { if (!player) { player = await kazagumo.createPlayer({ guildId: interaction.guildId, - textChannel: interaction.channelId, - voiceChannel: memberVoice.id, + textId: interaction.channelId, + voiceId: memberVoice.id, + shardId: interaction.guild.shardId || 0, volume: 50, deaf: true });