1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 02:00:20 +00:00

Timeout Catch

This commit is contained in:
MatteZ02 2020-06-04 08:41:11 +03:00
parent 1a04b7098f
commit 04858d8a27
2 changed files with 9 additions and 0 deletions

View File

@ -176,6 +176,7 @@ module.exports = {
statusField4: "Shard: ",
statusTitle: "Status for Musix",
stop: emojis.stop + "Stopped the music!",
tookTooLong: emojis.redx + "Something took too long! Please try again!",
validNumber: emojis.redx + "I'm sorry, But you need to enter a valid __number__.",
wrongVoiceChannel: emojis.redx +
"I'm sorry but you need to be in the same voice channel as Musix to use this command!",

View File

@ -12,6 +12,14 @@ module.exports = async function (guild, song, client, seek, play) {
client.queue.delete(guild.id);
return;
}
setTimeout(() => {
if (!queue.playing) {
queue.textChannel.send(client.messages.tookTooLong);
queue.voiceChannel.leave();
client.queue.delete(guild.id);
return;
}
}, 45000);
streamConfig.options.seek = seek;