mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat(ui): upgrade queue, search, lyrics, and radio embeds
- Transform %queue / %list with Now Playing thumbnail, ranked item cards, and localized footer - Enhance %search with provider icons, artist metadata, and localized cancel options - Polish %lyrics with album thumbnail, Synced badge, and structured header - Redesign %radio directory with command pills and localized pagination controls - Standardize brand color 0xe9196c across all player commands - Add complete translations across all 6 locales (en, ar-SA, ckb, tr, de-DE, pt-BR)
This commit is contained in:
1 parent
b7f20fcb02
commit
2494bf79d6
11 files changed
+158
-71
No files matched your search
+20
-7
@@ -50,17 +50,29 @@ export async function run(msg, data) {
|
||||
const buildPage = () => {
|
||||
const start = page * perPage;
|
||||
const pickable = radios.slice(start, start + perPage);
|
||||
const prefix = this.handler.getPrefix(msg.message?.guildId ?? msg.channel?.guildId) || "%";
|
||||
|
||||
let desc = `📻 **Radio Stations (Page ${page + 1}/${totalPages})**\n\n`;
|
||||
let desc = "";
|
||||
pickable.forEach((r, i) => {
|
||||
const displayName = r.detailedName ?? r.name ?? "Station";
|
||||
const stationDesc = String(r.description ?? "").replaceAll("\n", "\n ");
|
||||
desc += `${NUMBER_EMOJIS[i]} **${displayName}** (\`${r.name ?? "station"}\`)\n`;
|
||||
desc += ` ${stationDesc}\n\n`;
|
||||
desc += `${NUMBER_EMOJIS[i]} **${displayName}** (\`${prefix}radio ${r.name ?? "station"}\`)\n`;
|
||||
if (stationDesc) desc += ` ${stationDesc}\n\n`;
|
||||
else desc += "\n";
|
||||
});
|
||||
desc += `⬅️ Previous ➡️ Next ❌ Cancel`;
|
||||
|
||||
return { payload: { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc)] }, pickable };
|
||||
const authorName = this.t(msg, "responses.radio.stationsAuthor") || "24/7 Radio Station Directory";
|
||||
const titleName = this.t(msg, "responses.radio.stationsTitle", { page: page + 1, total: totalPages });
|
||||
const footerText = this.t(msg, "responses.radio.prevNext");
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: authorName })
|
||||
.setTitle(titleName)
|
||||
.setDescription(desc.trim())
|
||||
.setFooter({ text: footerText });
|
||||
|
||||
return { payload: { embeds: [embed] }, pickable };
|
||||
};
|
||||
|
||||
let { payload, pickable } = buildPage();
|
||||
@@ -165,13 +177,14 @@ async function playStation(ctx, msg, radio, editTarget = null) {
|
||||
const stationLine = stationUrl
|
||||
? `**[${stationName}](${stationUrl})**\n\n`
|
||||
: `**${stationName}**\n\n`;
|
||||
const skipHint = ctx.t(msg, "responses.radio.skipHint", { prefix }) || `_Use \`${prefix}skip\` to stop the radio, or \`${prefix}radio list\` to switch stations._`;
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setColor(0xe9196c)
|
||||
.setTitle(`📻 ${stationName}`)
|
||||
.setDescription(
|
||||
stationLine +
|
||||
`${stationDesc}\n\n` +
|
||||
`_Use \`${prefix}skip\` to stop the radio, or \`${prefix}radio list\` to switch stations._`
|
||||
skipHint
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
Reference in new issue
Block a user