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:
parent
1a04b7098f
commit
04858d8a27
@ -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!",
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user