From ea3aebe4eb1af7de4d502ca06af760527752becf Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sat, 25 Nov 2023 18:41:36 +0500 Subject: [PATCH] fix error if message now playing doesn't exist --- base/Client.js | 4 ++-- commands/Music/nowplaying.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/Client.js b/base/Client.js index 31073008..7452baf3 100644 --- a/base/Client.js +++ b/base/Client.js @@ -46,13 +46,13 @@ class JaBaClient extends Client { setTimeout(() => { const message = queue.metadata.channel.messages.cache.get(m); - if (message.deletable) message.delete(); + if (message && message.deletable) message.delete(); }, track.durationMS); else setTimeout(() => { const message = queue.metadata.channel.messages.cache.get(m); - if (message.deletable) message.delete(); + if (message && message.deletable) message.delete(); }, 5 * 60 * 1000); // m * s * ms }); this.player.events.on("emptyQueue", queue => queue.metadata.channel.send(this.translate("music/play:QUEUE_ENDED", null, queue.metadata.channel.guild.data.language))); diff --git a/commands/Music/nowplaying.js b/commands/Music/nowplaying.js index c07f617f..325a61fa 100644 --- a/commands/Music/nowplaying.js +++ b/commands/Music/nowplaying.js @@ -219,7 +219,7 @@ class Nowplaying extends BaseCommand { components: [row1, row2], }); } else clearInterval(i); - }, 2 * 60 * 1000); + }, 1 * 60 * 1000); } }