mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
fix error if message now playing doesn't exist
This commit is contained in:
parent
c9d61d0e98
commit
ea3aebe4eb
2 changed files with 3 additions and 3 deletions
|
@ -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)));
|
||||
|
|
|
@ -219,7 +219,7 @@ class Nowplaying extends BaseCommand {
|
|||
components: [row1, row2],
|
||||
});
|
||||
} else clearInterval(i);
|
||||
}, 2 * 60 * 1000);
|
||||
}, 1 * 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue