Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
Adivise committed Mar 7, 2022
1 parent 43006e6 commit 9dc6df6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions structures/PageQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ const NormalPlaylist = async (client, message, pages, timeout, queueLength, lang

let page = 0;
const curPage = await message.channel.send({ embeds: [pages[page].setFooter({ text: `${client.i18n.get(language, "playlist", "view_embed_footer", {
page: i + 1,
pages: pagesNum,
page: page + 1,
pages: pages.length,
songs: queueLength
})}` })], components: [row], allowedMentions: { repliedUser: false } });
if(pages.length == 0) return;
Expand All @@ -144,17 +144,17 @@ const NormalPlaylist = async (client, message, pages, timeout, queueLength, lang
page = page + 1 < pages.length ? ++page : 0;
}
curPage.edit({ embeds: [pages[page].setFooter({ text: `${client.i18n.get(language, "playlist", "view_embed_footer", {
page: i + 1,
pages: pagesNum,
page: page + 1,
pages: pages.length,
songs: queueLength
})}` })], components: [row] })
});
collector.on('end', () => {
const disabled = new MessageActionRow()
.addComponents(row1.setDisabled(true), row2.setDisabled(true))
curPage.edit({ embeds: [pages[page].setFooter({ text: `${client.i18n.get(language, "playlist", "view_embed_footer", {
page: i + 1,
pages: pagesNum,
page: page + 1,
pages: pages.length,
songs: queueLength
})}` })], components: [disabled] })
});
Expand All @@ -178,8 +178,8 @@ const SlashPlaylist = async (client, message, pages, timeout, queueLength, langu

let page = 0;
const curPage = await message.editReply({ embeds: [pages[page].setFooter({ text: `${client.i18n.get(language, "playlist", "view_embed_footer", {
page: i + 1,
pages: pagesNum,
page: page + 1,
pages: pages.length,
songs: queueLength
})}` })], components: [row], allowedMentions: { repliedUser: false } });
if(pages.length == 0) return;
Expand All @@ -195,17 +195,17 @@ const SlashPlaylist = async (client, message, pages, timeout, queueLength, langu
page = page + 1 < pages.length ? ++page : 0;
}
curPage.edit({ embeds: [pages[page].setFooter({ text: `${client.i18n.get(language, "playlist", "view_embed_footer", {
page: i + 1,
pages: pagesNum,
page: page + 1,
pages: pages.length,
songs: queueLength
})}` })], components: [row] })
});
collector.on('end', () => {
const disabled = new MessageActionRow()
.addComponents(row1.setDisabled(true), row2.setDisabled(true))
curPage.edit({ embeds: [pages[page].setFooter({ text: `${client.i18n.get(language, "playlist", "view_embed_footer", {
page: i + 1,
pages: pagesNum,
page: page + 1,
pages: pages.length,
songs: queueLength
})}` })], components: [disabled] })
});
Expand Down

0 comments on commit 9dc6df6

Please sign in to comment.