mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
fix queue 💀
This commit is contained in:
parent
f628812c1c
commit
46d4ee82ca
1 changed files with 6 additions and 5 deletions
|
@ -62,7 +62,7 @@ class Queue extends BaseCommand {
|
||||||
if (i.isButton()) {
|
if (i.isButton()) {
|
||||||
if (i.customId === "queue_prev_page") {
|
if (i.customId === "queue_prev_page") {
|
||||||
i.deferUpdate();
|
i.deferUpdate();
|
||||||
if (embeds != generateQueueEmbeds(interaction, queue)) embeds = generateQueueEmbeds(interaction, queue);
|
if (embeds != generateQueueEmbeds(client, interaction, queue)) embeds = generateQueueEmbeds(client, interaction, queue);
|
||||||
|
|
||||||
if (currentPage !== 0) {
|
if (currentPage !== 0) {
|
||||||
--currentPage;
|
--currentPage;
|
||||||
|
@ -74,7 +74,7 @@ class Queue extends BaseCommand {
|
||||||
}
|
}
|
||||||
} else if (i.customId === "queue_next_page") {
|
} else if (i.customId === "queue_next_page") {
|
||||||
i.deferUpdate();
|
i.deferUpdate();
|
||||||
if (embeds != generateQueueEmbeds(interaction, queue)) embeds = generateQueueEmbeds(interaction, queue);
|
if (embeds != generateQueueEmbeds(client, interaction, queue)) embeds = generateQueueEmbeds(client, interaction, queue);
|
||||||
|
|
||||||
if (currentPage < embeds.length - 1) {
|
if (currentPage < embeds.length - 1) {
|
||||||
currentPage++;
|
currentPage++;
|
||||||
|
@ -86,7 +86,7 @@ class Queue extends BaseCommand {
|
||||||
}
|
}
|
||||||
} else if (i.customId === "queue_jump_page") {
|
} else if (i.customId === "queue_jump_page") {
|
||||||
i.deferUpdate();
|
i.deferUpdate();
|
||||||
if (embeds != generateQueueEmbeds(interaction, queue)) embeds = generateQueueEmbeds(interaction, queue);
|
if (embeds != generateQueueEmbeds(client, interaction, queue)) embeds = generateQueueEmbeds(client, interaction, queue);
|
||||||
|
|
||||||
const msg = await interaction.followUp({
|
const msg = await interaction.followUp({
|
||||||
content: interaction.translate("misc:JUMP_TO_PAGE", {
|
content: interaction.translate("misc:JUMP_TO_PAGE", {
|
||||||
|
@ -143,8 +143,9 @@ class Queue extends BaseCommand {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function generateQueueEmbeds(client, interaction, queue) {
|
function generateQueueEmbeds(client, interaction, queue) {
|
||||||
const embeds = [];
|
const embeds = [],
|
||||||
const currentTrack = queue.currentTrack;
|
currentTrack = queue.currentTrack;
|
||||||
|
|
||||||
let k = 10;
|
let k = 10;
|
||||||
|
|
||||||
if (!queue.tracks.size) {
|
if (!queue.tracks.size) {
|
||||||
|
|
Loading…
Reference in a new issue