fix error if message now playing doesn't exist

This commit is contained in:
Jonny_Bro (Nikita) 2023-11-25 18:41:36 +05:00
parent c9d61d0e98
commit ea3aebe4eb
2 changed files with 3 additions and 3 deletions

View file

@ -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)));

View file

@ -219,7 +219,7 @@ class Nowplaying extends BaseCommand {
components: [row1, row2],
});
} else clearInterval(i);
}, 2 * 60 * 1000);
}, 1 * 60 * 1000);
}
}