mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat(ui): modernize bot commands, Last.fm suite, and system embeds
- Modernize audio controls (%volume, %volumedefault, %bassboost, %autoplay, %trackopt, %shuffle, %clear, %list, %pause, %resume) - Upgrade Last.fm suite (%lastfm play directory, spotlight cards, music podiums, tags, and profile stats) - Polish system & voice embeds (%vote supporter verification, %servers network directory, %forceleave, and 24/7 watchdog) - Achieve 100% localization parity across all 6 locales (en, ar-SA, ckb, tr, de-DE, pt-BR) with zero missing keys
This commit is contained in:
1 parent
885db461ce
commit
e8171dce26
33 files changed
+1529
-440
No files matched your search
+24
-11
@@ -78,25 +78,38 @@ export async function openLyricsViewer(bot, msg, player, refresh, session) {
|
||||
let currentPage = 0;
|
||||
|
||||
const buildLyricsContent = (pageIdx, expired = false, closed = false) => {
|
||||
const title = Utils.truncate(
|
||||
player.queue.getCurrent()?.title?.replace(/\(Official.*?\)/gi, '').trim() ?? '',
|
||||
50
|
||||
);
|
||||
const current = player.queue.getCurrent();
|
||||
const rawTitle = current?.title?.replace(/\(Official.*?\)/gi, '').trim() ?? 'Unknown Track';
|
||||
const title = Utils.truncate(rawTitle, 50);
|
||||
const artist = current?.artist || (typeof current?.author === "object" ? current?.author?.name : current?.author) || "";
|
||||
const lyricsSource = lyricsResult.source || "Lyrics";
|
||||
const footerText = closed
|
||||
? `👋 Lyrics closed • ${lyricsSource} • ${totalLines} lines`
|
||||
: expired
|
||||
? `⌛ Controls expired • ${lyricsSource} • ${totalLines} lines`
|
||||
: `${lyricsSource} • ${totalLines} lines total${lyricsResult.synced ? ' • Synced' : ''}`;
|
||||
const headerLine = artist ? `by **${artist}**${syncBadge} • Page ${pageIdx + 1}/${totalPages}` : `Page ${pageIdx + 1}/${totalPages}${syncBadge}`;
|
||||
const desc = [
|
||||
`**${title}**${syncBadge} • Page ${pageIdx + 1}/${totalPages}`,
|
||||
``,
|
||||
'```',
|
||||
headerLine,
|
||||
"",
|
||||
"```",
|
||||
pages[pageIdx],
|
||||
totalPages > 1 && !expired && !closed ? `\n\n💡 ⬅️ ➡️ Navigate • ❌ Close` : '',
|
||||
'```'
|
||||
].join('\n');
|
||||
return { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc).setFooter({ text: footerText })] };
|
||||
totalPages > 1 && !expired && !closed ? "\n\n💡 ⬅️ ➡️ Navigate • ❌ Close" : "",
|
||||
"```"
|
||||
].join("\n");
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: "🎤 " + (bot.t(msg, "responses.lyrics.author") || "Lyrics") })
|
||||
.setTitle(title)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: footerText });
|
||||
|
||||
if (current?.thumbnail) {
|
||||
embed.setThumbnail(current.thumbnail);
|
||||
}
|
||||
|
||||
return { embeds: [embed] };
|
||||
};
|
||||
|
||||
session.activeLyricsMsg = await msg.reply(buildLyricsContent(0));
|
||||
|
||||
Reference in new issue
Block a user