From 10c6a8c589fd19e7975f27c9a56eb27beebf2954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Wed, 23 Jun 2021 01:25:45 +0300 Subject: [PATCH] Stopped using dispatcher --- src/client/commands/maintenance.js | 2 +- src/client/commands/play.js | 2 +- src/client/commands/stop.js | 2 +- src/client/commands/volume.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/commands/maintenance.js b/src/client/commands/maintenance.js index 8794be3..bfb3a42 100644 --- a/src/client/commands/maintenance.js +++ b/src/client/commands/maintenance.js @@ -27,7 +27,7 @@ module.exports = { if(currentRadio){ client.funcs.statisticsUpdate(client, currentRadio.currentGuild.guild, currentRadio); - currentRadio.connection.dispatcher?.destroy(); + currentRadio.connection.destroy(); currentRadio.voiceChannel.leave(); const cembed = new Discord.MessageEmbed() .setTitle(client.messages.maintenanceTitle) diff --git a/src/client/commands/play.js b/src/client/commands/play.js index aa01e4c..5067558 100644 --- a/src/client/commands/play.js +++ b/src/client/commands/play.js @@ -76,7 +76,7 @@ module.exports = { if (radio) { client.funcs.statisticsUpdate(client, msg.guild, radio); - radio.connection.dispatcher.destroy(); + radio.connection.destroy(); radio.station = station; radio.textChannel = msg.channel; play(msg.guild, client, url); diff --git a/src/client/commands/stop.js b/src/client/commands/stop.js index 1697f29..6cc9a72 100644 --- a/src/client/commands/stop.js +++ b/src/client/commands/stop.js @@ -9,7 +9,7 @@ module.exports = { const radio = client.radio.get(msg.guild.id); if (client.funcs.check(client, msg, command)) { client.funcs.statisticsUpdate(client, msg.guild, radio); - radio.connection.dispatcher.destroy(); + radio.connection.destroy(); radio.voiceChannel.leave(); client.radio.delete(msg.guild.id); msg.channel.send(client.messageEmojis["stop"] + client.messages.stop); diff --git a/src/client/commands/volume.js b/src/client/commands/volume.js index 94d80c4..4b622f1 100644 --- a/src/client/commands/volume.js +++ b/src/client/commands/volume.js @@ -19,7 +19,7 @@ module.exports = { if (volume > 100) return msg.channel.send(client.messages.maxVolume); if (volume < 0) return msg.channel.send(client.messages.negativeVolume); radio.volume = volume; - radio.connection.dispatcher.setVolume(volume / 5); + /*radio.connection.dispatcher.setVolume(volume / 5);*/ message.newVolume = client.messages.newVolume.replace("%volume%", volume); return msg.channel.send(message.newVolume); }