DIspatcher nullable in maintenance command

This commit is contained in:
Christer Warén 2021-01-21 14:21:25 +02:00
parent 84a780723e
commit 490b2f1792

View File

@ -27,7 +27,7 @@ module.exports = {
if(currentRadio){ if(currentRadio){
client.funcs.statisticsUpdate(client, currentRadio.currentGuild.guild, currentRadio); client.funcs.statisticsUpdate(client, currentRadio.currentGuild.guild, currentRadio);
currentRadio.connection.dispatcher.destroy(); currentRadio.connection.dispatcher?.destroy();
currentRadio.voiceChannel.leave(); currentRadio.voiceChannel.leave();
const cembed = new Discord.MessageEmbed() const cembed = new Discord.MessageEmbed()
.setTitle(client.messages.maintenanceTitle) .setTitle(client.messages.maintenanceTitle)