feat(ui): overhaul remaining embeds for help, queue ops, audio mastering & community

- Upgrade %help overview with feature highlights and %help <command> with rich embed inspector
- Fix %playnext embed wrapping bug causing [object Object] and add Playing Next badge
- Upgrade %trackopt set/get/play with visual cut-window timeline bars
- Upgrade %remove and %move with queue change receipt cards
- Upgrade %normalize and %volumedefault with EBU R128 mastering and volume slider bars
- Upgrade %whoknows with ranked Crown Holder cards and podium medals
- Upgrade %invite and %support with rich in-embed markdown links (no button dependencies)
- Upgrade voice join and %vote with branded status embeds
This commit is contained in:
NoLogicAlan committed 2026-10-25 03:54:02 +03:00
1 parent 4c3c04bd7d
commit 8689dee50a
13 files changed
+332 -99

No files matched your search

+11 -4
View File
@@ -25,8 +25,6 @@ export const command = new CommandBuilder()
* @returns {Promise<void>}
*/
export async function run(message) {
const description = this.t(message, "responses.invite.description");
const botUser = this.client?.user;
const botIcon = botUser?.displayAvatarURL?.() || null;
@@ -36,8 +34,17 @@ export async function run(message) {
name: this.t(message, "responses.invite.title"),
iconURL: botIcon
})
.setDescription(description)
;
.setTitle("Add Remix to Your Server")
.setDescription(
"High-fidelity 24/7 Music Bot supporting YouTube, Spotify, SoundCloud, Apple Music & Deezer.\n\n" +
"💎 **48kHz Hi-Fi Audio** • 🎛️ **30+ Filters** • ⚡ **Dynamic Normalizer** • 📻 **Live Web Radio**\n\n" +
"**Quick Links:**\n" +
"• [➕ **Add Remix to Server**](https://fluxerlist.com/bots/remix)\n" +
"• [💬 **Join Support Community**](https://fluxer.gg/remix)"
)
.setFooter({ text: "Remix • Free & Open-Source Music" });
if (botIcon) embed.setThumbnail(botIcon);
await message.reply({
embeds: [embed]
+22 -10
View File
@@ -124,18 +124,30 @@ export async function runWhoknowsActions(msg, data, lastfm, prefix, userId, targ
const MEDALS = ["🥇", "🥈", "🥉"];
const totalPlays = listeners.reduce((sum, l) => sum + l.playcount, 0);
const lines = listeners.map((l, i) => {
const medal = i < 3 ? MEDALS[i] : ` `;
return `${medal} ${i + 1}. **${l.username}** — **${Utils.formatNumber(l.playcount)}** ${this.t(msg, "responses.lastfm.plays")}`;
});
const desc = lines.join("\n").slice(0, 4096);
const top1 = listeners[0];
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setTitle(this.t(msg, "responses.lastfm.whoknowsTitle", { artist: artistName }))
.setDescription(desc)
.setFooter({ text: this.t(msg, "responses.lastfm.whoknowsFooter", { count: listeners.length, plural: listeners.length !== 1 ? "s" : "", totalPlays: Utils.formatNumber(totalPlays) }) });
.setAuthor({ name: "👑 Server Music Leaderboard" })
.setTitle(artistName)
.setFooter({ text: `${listeners.length} listener${listeners.length !== 1 ? "s" : ""} • ${Utils.formatNumber(totalPlays)} total plays • %fm` });
if (top1) {
embed.addFields({
name: "👑 Crown Holder (#1)",
value: `**${top1.username}** — **${Utils.formatNumber(top1.playcount)}** ${this.t(msg, "responses.lastfm.plays")}`,
inline: false
});
}
const rest = listeners.slice(1);
if (rest.length > 0) {
const lines = rest.map((l, i) => {
const rank = i + 2;
const medal = rank === 2 ? "🥈" : rank === 3 ? "🥉" : `\`#${rank}\``;
return `${medal} **${l.username}** — **${Utils.formatNumber(l.playcount)}** ${this.t(msg, "responses.lastfm.plays")}`;
});
embed.setDescription(lines.join("\n").slice(0, 4096));
}
const replyPayload = { embeds: [embed] };
if (statusMsg) statusMsg.edit(replyPayload).catch(() => msg.reply(replyPayload));
+18 -1
View File
@@ -4,6 +4,8 @@
*/
import { CommandBuilder } from "../src/commands/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
import { getGlobalColor } from "../src/ui/index.mjs";
/** @type {CommandBuilder} @description Command definition for the move command. */
export const command = new CommandBuilder()
@@ -37,6 +39,21 @@ export async function run(message, data) {
const to = data.get("to")?.value;
if (from === null || from === undefined || from < 1) return message.replyEmbed("Source position must be 1 or greater.").catch(() => {});
if (to === null || to === undefined || to < 1) return message.replyEmbed("Target position must be 1 or greater.").catch(() => {});
const queueData = p.queue?.data ?? [];
const track = queueData[from - 1];
const res = p.move(from, to);
message.replyEmbed(res).catch(() => {});
if (typeof res === "string" && !res.startsWith("Moved")) {
return message.replyEmbed(res).catch(() => {});
}
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "🔀 Track Reordered" })
.setTitle(track?.title?.slice(0, 256) || "Reordered Track")
.setDescription(`Moved from position **#${from}** ➔ **#${to}** in the queue.`)
.setFooter({ text: to === 1 ? "Now playing next after the current song • %np" : "%list to view updated queue" });
if (track?.thumbnail) embed.setThumbnail(track.thumbnail);
message.reply({ embeds: [embed] }).catch(() => {});
}
+14 -9
View File
@@ -65,13 +65,18 @@ export async function run(message, data) {
}
}
const embed = new EmbedBuilder().setColor(getGlobalColor());
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "🎚️ Dynamic Loudness Normalization" })
.setTitle("EBU R128 Audio Leveling")
.setFooter({ text: "Balances volume differences across YouTube, Spotify & SoundCloud" });
const statusMsg = newState
? this.t(message, "responses.normalize.statusEnabled")
: this.t(message, "responses.normalize.statusDisabled");
const infoMsg = this.t(message, "responses.normalize.info");
let desc = `${statusMsg}\n\n*${infoMsg}*`;
embed.setDescription(`${statusMsg}\n\n*${infoMsg}*`);
if (p) {
const current = p.queue?.getCurrent?.();
@@ -80,14 +85,14 @@ export async function run(message, data) {
const gain = calculateNormalizationGain(current);
const gainDb = (20 * Math.log10(gain)).toFixed(1);
const gainSign = gain >= 1 ? "+" : "";
desc += "\n\n" + this.t(message, "responses.normalize.trackInfo", {
source,
gainDb: `${gainSign}${gainDb}`,
gainPct: (gain * 100).toFixed(0),
effective: Math.round(p.getEffectiveVolume()),
});
embed.addFields(
{ name: "Track Source", value: source || "Default", inline: true },
{ name: "Gain Offset", value: `${gainSign}${gainDb} dB (${(gain * 100).toFixed(0)}%)`, inline: true },
{ name: "Effective Volume", value: `${Math.round(p.getEffectiveVolume())}%`, inline: true }
);
}
}
message.reply({ embeds: [embed.setDescription(desc)] }).catch(() => {});
message.reply({ embeds: [embed] }).catch(() => {});
}
+15 -1
View File
@@ -70,7 +70,21 @@ export async function run(message, data) {
const requester = message.author?.id ?? message.authorId ?? null;
const messages = p.playFirst(query, provider, { requester });
messages.on("message", d => {
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(d);
let embed;
if (d instanceof EmbedBuilder) {
embed = d;
} else if (d?.embeds?.[0]) {
embed = d.embeds[0];
} else {
embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(String(d));
}
/* Set Playing Next author tag on the added track embed */
const authorName = embed.data?.author?.name || "";
if (authorName.includes("Added to Queue") || !authorName) {
embed.setAuthor({ name: "⚡ Playing Next • Top of Queue (#1)" });
}
if (statusMsg) statusMsg.edit({ embeds: [embed] }).catch(() => {});
});
}
+28 -2
View File
@@ -4,6 +4,8 @@
*/
import { CommandBuilder } from "../src/commands/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
import { getGlobalColor } from "../src/ui/index.mjs";
/** @type {CommandBuilder} @description Command definition for the remove command. */
export const command = new CommandBuilder()
@@ -35,11 +37,35 @@ export async function run(message, data) {
const to = parseInt(rangeMatch[2], 10);
if (from < 1 || to < 1) return message.replyEmbed("Queue positions must be 1 or greater.").catch(() => {});
const res = p.removeRange(from - 1, to - 1);
return message.replyEmbed(res).catch(() => {});
if (typeof res === "string" && !res.includes("Successfully")) {
return message.replyEmbed(res).catch(() => {});
}
const remaining = p.queue?.size() ?? 0;
const count = Math.abs(to - from) + 1;
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "🗑️ Removed from Queue" })
.setTitle(`Removed ${count} Tracks`)
.setDescription(`Successfully removed positions **#${Math.min(from, to)}** to **#${Math.max(from, to)}** from the queue.`)
.setFooter({ text: `${remaining} track${remaining === 1 ? "" : "s"} remaining in queue • %list` });
return message.reply({ embeds: [embed] }).catch(() => {});
}
const single = parseInt(raw, 10);
if (isNaN(single) || single < 1) return message.replyEmbed("Queue position must be 1 or greater.").catch(() => {});
const queueData = p.queue?.data ?? [];
const track = queueData[single - 1];
const res = p.remove(single - 1);
message.replyEmbed(res).catch(() => {});
if (typeof res === "string" && res.toLowerCase().includes("out of bounds")) {
return message.replyEmbed(res).catch(() => {});
}
const remaining = p.queue?.size() ?? 0;
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "🗑️ Removed from Queue" })
.setTitle(track?.title?.slice(0, 256) || "Removed Track")
.setDescription(`Removed track at position **#${single}** from the queue.`)
.setFooter({ text: `${remaining} track${remaining === 1 ? "" : "s"} remaining in queue • %list` });
if (track?.thumbnail) embed.setThumbnail(track.thumbnail);
return message.reply({ embeds: [embed] }).catch(() => {});
}
+14 -2
View File
@@ -21,12 +21,24 @@ export const command = new CommandBuilder()
* @returns {void}
*/
export function run(msg) {
const botUser = this.client?.user;
const botIcon = botUser?.displayAvatarURL?.() || null;
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({
name: "Remix Support Community",
iconURL: botIcon
})
.setTitle(this.t(msg, "responses.support.title"))
.setDescription(
this.t(msg, "responses.support.description")
"Need help, want to report a bug, or suggest a new feature? Join our official community server:\n\n" +
"🚀 **[Join Support Server (fluxer.gg/remix)](https://fluxer.gg/remix)**\n\n" +
"🟢 **24/7 Community & Staff Assistance**\n" +
"Feature requests, announcements, and audio troubleshooting guides."
)
;
.setFooter({ text: "Remix Support • fluxer.gg/remix" });
if (botIcon) embed.setThumbnail(botIcon);
msg.reply({ embeds: [embed] }).catch(() => {});
}
+75 -13
View File
@@ -60,6 +60,30 @@ export const command = new CommandBuilder()
)
.addAlias("to");
/**
* @private
* Build a text-based ASCII timeline representation of the cut window.
* @param {number} startMs - Start time in milliseconds.
* @param {number} endMs - End time in milliseconds.
* @param {number} totalMs - Total track duration in milliseconds.
* @returns {string} Formatted timeline string.
*/
function buildTimelineBar(startMs, endMs, totalMs) {
if (!totalMs || totalMs <= 0) return `\`${Utils.prettifyMS(startMs)}\` ➔ \`${endMs > 0 ? Utils.prettifyMS(endMs) : "end"}\``;
const totalSlots = 18;
const startSlot = Math.min(totalSlots - 1, Math.floor((startMs / totalMs) * totalSlots));
const effectiveEnd = endMs > 0 ? endMs : totalMs;
const endSlot = Math.min(totalSlots, Math.max(startSlot + 1, Math.ceil((effectiveEnd / totalMs) * totalSlots)));
let bar = "";
for (let i = 0; i < totalSlots; i++) {
if (i < startSlot) bar += "─";
else if (i >= startSlot && i < endSlot) bar += "■";
else bar += "─";
}
return `\`${Utils.prettifyMS(startMs)}\` \`[${bar}]\` \`${Utils.prettifyMS(effectiveEnd)}\``;
}
/**
* @private
* Extract an alias:name token from a parts array, mutating the array in place.
@@ -157,14 +181,28 @@ export async function run(msg, data) {
}
const endLabel = endMs > 0 ? Utils.prettifyMS(endMs) : "full track";
let desc;
if (result.alias === DEFAULT_ALIAS) {
desc = this.t(msg, "responses.trackopt.saved", { title: current.title, aliasLabel: "", start: Utils.prettifyMS(startMs), end: endLabel });
} else {
desc = this.t(msg, "responses.trackopt.savedAlias", { title: current.title, alias: result.alias, start: Utils.prettifyMS(startMs), end: endLabel, prefix });
const timeline = buildTimelineBar(startMs, endMs, trackDuration);
const setEmbed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "✂️ Custom Track Trim Saved" })
.setTitle(current.title?.slice(0, 256) || "Track Trim")
.setDescription(
result.alias === DEFAULT_ALIAS
? this.t(msg, "responses.trackopt.saved", { title: current.title, aliasLabel: "", start: Utils.prettifyMS(startMs), end: endLabel })
: this.t(msg, "responses.trackopt.savedAlias", { title: current.title, alias: result.alias, start: Utils.prettifyMS(startMs), end: endLabel, prefix })
)
.addFields(
{ name: "Playback Window", value: timeline, inline: false },
{ name: "Alias", value: `\`${result.alias}\``, inline: true },
{ name: "Active Trim", value: `${Utils.prettifyMS(startMs)} ➔ ${endLabel}`, inline: true }
);
if (current.thumbnail) setEmbed.setThumbnail(current.thumbnail);
if (result.alias !== DEFAULT_ALIAS) {
setEmbed.setFooter({ text: `Play this cut anytime with: ${prefix}trackopt play ${result.alias}` });
}
return msg.reply({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc)] });
return msg.reply({ embeds: [setEmbed] });
}
if (subCommand === "get") {
@@ -173,15 +211,27 @@ export async function run(msg, data) {
return msg.reply({ embeds: [new EmbedBuilder().setColor(ERROR_COLOR).setDescription(this.t(msg, "responses.trackopt.notSet", { title: current.title }))] });
}
let desc = this.t(msg, "responses.trackopt.current", { title: current.title, count: rows.length }) + "\n\n";
for (const row of rows) {
const aliasLabel = row.alias === DEFAULT_ALIAS ? "default" : row.alias;
const trackDuration = p._getTrackDurationMs(current);
const getEmbed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "✂️ Saved Track Trims" })
.setTitle(current.title?.slice(0, 256) || "Track Trims")
.setFooter({ text: `${rows.length} trim profile${rows.length === 1 ? "" : "s"} saved • Apply with ${prefix}trackopt play <alias>` });
if (current.thumbnail) getEmbed.setThumbnail(current.thumbnail);
for (const row of rows.slice(0, 10)) {
const aliasLabel = row.alias === DEFAULT_ALIAS ? "default (auto-apply)" : row.alias;
const endStr = row.end_ms > 0 ? Utils.prettifyMS(row.end_ms) : "end";
const autoTag = row.alias === DEFAULT_ALIAS ? " ← auto" : "";
desc += this.t(msg, "responses.trackopt.currentEntry", { alias: aliasLabel, start: Utils.prettifyMS(row.start_ms), end: endStr, autoTag }) + "\n";
const timeline = buildTimelineBar(row.start_ms, row.end_ms, trackDuration);
getEmbed.addFields({
name: `🏷️ ${aliasLabel}`,
value: `${timeline}\n${Utils.prettifyMS(row.start_ms)} ➔ ${endStr}`,
inline: false
});
}
return msg.reply({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc)] });
return msg.reply({ embeds: [getEmbed] });
}
if (subCommand === "play") {
@@ -217,7 +267,19 @@ export async function run(msg, data) {
const aliasLabel = safeAlias === DEFAULT_ALIAS ? "default" : safeAlias;
const endStr = result.endMs > 0 ? Utils.prettifyMS(result.endMs) : "end";
return msg.reply({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.trackopt.applied", { alias: aliasLabel, start: Utils.prettifyMS(result.startMs), end: endStr }))] });
const trackDuration = p._getTrackDurationMs(current);
const timeline = buildTimelineBar(result.startMs, result.endMs, trackDuration);
const playEmbed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "✂️ Track Trim Applied" })
.setTitle(current.title?.slice(0, 256) || "Track Trim")
.setDescription(this.t(msg, "responses.trackopt.applied", { alias: aliasLabel, start: Utils.prettifyMS(result.startMs), end: endStr }))
.addFields({ name: "Active Cut Range", value: timeline, inline: false });
if (current.thumbnail) playEmbed.setThumbnail(current.thumbnail);
return msg.reply({ embeds: [playEmbed] });
} catch (e) {
return msg.reply({ embeds: [new EmbedBuilder().setColor(ERROR_COLOR).setDescription(this.t(msg, "responses.trackopt.applyFailed", { error: e.message }))] });
}
+28 -5
View File
@@ -9,6 +9,23 @@ import { getGlobalColor } from "../src/ui/index.mjs";
import { PermissionFlags } from "@fluxerjs/core";
import { MAX_VOLUME } from "../src/utils/UI.mjs";
/**
* @private
* Build an ASCII slider bar for volume display.
* @param {number} volume
* @param {number} max
* @returns {string}
*/
function buildVolumeSlider(volume, max = MAX_VOLUME) {
const totalSlots = 14;
const filled = Math.min(totalSlots, Math.max(0, Math.round((volume / max) * totalSlots)));
let bar = "";
for (let i = 0; i < totalSlots; i++) {
bar += i < filled ? "■" : "─";
}
return `\`0%\` \`[${bar}]\` \`${max}%\` • **${volume}%**`;
}
/** @type {CommandBuilder} @description Command definition for the volumedefault command. */
export const command = new CommandBuilder()
.setName("volumedefault")
@@ -53,13 +70,16 @@ export async function run(message, data) {
const currentPlayerVol = Math.round((p.preferredVolume ?? 1) * 100);
const pfx = this.handler.getPrefix(message.channel?.guildId ?? message.message?.guildId);
embed
.setAuthor({ name: "🔊 Server Default Volume" })
.setTitle(this.t(message, "responses.volumedefault.title"))
.setDescription(
this.t(message, "responses.volumedefault.serverDefault", { volume: currentDefault }) + "\n" +
this.t(message, "responses.volumedefault.currentVolume", { volume: currentPlayerVol }) + "\n\n" +
(hasManage
hasManage
? this.t(message, "responses.volumedefault.changeHint", { prefix: pfx, max: MAX_VOLUME })
: this.t(message, "responses.volumedefault.noPermission"))
: this.t(message, "responses.volumedefault.noPermission")
)
.addFields(
{ name: "Default Volume", value: buildVolumeSlider(currentDefault), inline: false },
{ name: "Active Session Volume", value: `${currentPlayerVol}%`, inline: true }
);
} else if (!hasManage) {
embed.setDescription(this.t(message, "responses.volumedefault.noPermissionSet"));
@@ -70,7 +90,10 @@ export async function run(message, data) {
} else {
p.setVolume(pct / 100);
if (set) set.set("volume", pct);
embed.setDescription(this.t(message, "responses.volumedefault.saved", { volume: pct }));
embed
.setAuthor({ name: "🔊 Server Default Volume Saved" })
.setDescription(this.t(message, "responses.volumedefault.saved", { volume: pct }))
.addFields({ name: "New Default Level", value: buildVolumeSlider(pct), inline: false });
}
}
+3 -1
View File
@@ -169,8 +169,10 @@ export async function run(msg, data) {
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "🗳️ Vote for Remix" })
.setTitle(this.t(msg, "responses.vote.voteTitle"))
.setDescription(descLines.join("\n"));
.setDescription(descLines.join("\n"))
.setFooter({ text: `Check your vote status: ${prefix}vote check • %voters` });
return msg.reply({ embeds: [embed] });
}