mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Better queue command
This commit is contained in:
@@ -13,18 +13,32 @@ const EMBEDS = {
|
|||||||
description: `The queue is empty!`,
|
description: `The queue is empty!`,
|
||||||
user: (data instanceof Interaction) ? data.user : data.author
|
user: (data instanceof Interaction) ? data.user : data.author
|
||||||
});
|
});
|
||||||
else if(queue.track.length == 1)
|
else {
|
||||||
return makeInfoEmbed({
|
if(queue.track.length == 1) {
|
||||||
title: `Queue`,
|
let queueString = `1. [${queue.track[0].title}](${queue.track[0].url})`
|
||||||
description: `Now playing: ${queue.track[0].title}\n\nThe queue is empty!`,
|
return makeInfoEmbed({
|
||||||
user: (data instanceof Interaction) ? data.user : data.author
|
title: `Queue`,
|
||||||
});
|
description: `Now playing: ${queue.track[0].title}\n\nThere are ${queue.track.length} song in the queue!\n${queueString}`,
|
||||||
else
|
user: (data instanceof Interaction) ? data.user : data.author
|
||||||
return makeInfoEmbed({
|
});
|
||||||
title: `Queue`,
|
}
|
||||||
description: `Now playing: ${queue.track[0].title}\n\nUpcoming song: ${queue.track[1].title}\n\nThere are ${Object.keys(queue).length} songs in the queue!`,
|
else if(queue.track.length >= 10) {
|
||||||
user: (data instanceof Interaction) ? data.user : data.author
|
let first10 = queue.track.slice(0, 10);
|
||||||
});
|
let queueString = first10.map((track, index) => `${index + 1}. [${track.title}](${track.url})`).join("\n");
|
||||||
|
return makeInfoEmbed({
|
||||||
|
title: `Queue`,
|
||||||
|
description: `Now playing: ${queue.track[0].title}\nUpcoming song: ${queue.track[1].title}\n\nThere are ${queue.track.length} songs in the queue!\n${queueString}\n${queue.track.length > 10 ? `...${queue.track.length - 10} more songs` : ""}`,
|
||||||
|
user: (data instanceof Interaction) ? data.user : data.author
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let queueString = queue.track.map((track, index) => `${index + 1}. [${track.title}](${track.url})`).join("\n");
|
||||||
|
return makeInfoEmbed({
|
||||||
|
title: `Queue`,
|
||||||
|
description: `Now playing: ${queue.track[0].title}\nUpcoming song: ${queue.track[1].title}\n\nThere are ${queue.track.length} songs in the queue!\n${queueString}`,
|
||||||
|
user: (data instanceof Interaction) ? data.user : data.author
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
NO_MUSIC_PLAYING: (data: Message | Interaction) => {
|
NO_MUSIC_PLAYING: (data: Message | Interaction) => {
|
||||||
return makeErrorEmbed({
|
return makeErrorEmbed({
|
||||||
|
|||||||
Reference in New Issue
Block a user