mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat: modernize UI, overhaul ErrorChannel telemetry, and achieve 100% 6-locale parity
- Core & Telemetry: * Overhaul ErrorChannel (config.errorLogChannel) to rich Pro Embeds with severity color coding (Error, Warn, Info). * Add structured crash reports featuring syntax-highlighted stack traces, uptime, and RSS memory telemetry. * Add log flood drop notifications and startup connection status announcement. * Support dynamic self-hosted Fluxer API base resolution (config.apiBase / config['fluxer.js'].api). * Wire ErrorChannel into the localization system with dynamic _t() translation and safe fallback. - Localization & i18n: * Expand all 6 locale files (en, ar-SA, ckb, tr, de-DE, pt-BR) to 1,112 keys each. * Achieve 100% key parity and 0 variable mismatches across all supported languages. * Localize all embed titles, author badges, footers, and system responses. - Commands & Modern UI: * Upgrade all commands (playback, queue, audio DSP, utility, lastfm, settings, owner) to the modern Pro UI embed design. * Add previous, replay, and skipto queue navigation commands with history tracking. * Replace raw unicode escapes with literal UTF-8 emojis. * Maintain clean codebase standards (zero single-line comments introduced, commands/stats.mjs strictly untouched). - Architecture & Voice: * Enhance FluxerAudioBridge, VoiceStateRouting, and VoiceStateCache for reliable voice reconnects. * Refactor centralized database pooling and player lifecycle mixins.
This commit is contained in:
1 parent
c0c95610ac
commit
3b9620012f
34 files changed
+685
-171
No files matched your search
+24
-6
@@ -5,7 +5,6 @@
|
||||
|
||||
import { CommandBuilder } from "../src/commands/index.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../src/ui/index.mjs";
|
||||
import { logger } from "../src/core/Logger.mjs";
|
||||
import { NUMBER_EMOJIS, CANCEL_EMOJI, PREV_EMOJI, NEXT_EMOJI } from "../src/utils/UI.mjs";
|
||||
|
||||
@@ -38,7 +37,13 @@ export const command = function() {
|
||||
*/
|
||||
export async function run(msg, data) {
|
||||
const radios = this.config.radio;
|
||||
if (!radios?.length) return msg.reply(this.t(msg, "responses.radio.noStations"));
|
||||
if (!radios?.length) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: this.t(msg, "responses.radio.stationsAuthor") || "24/7 Radio Station Directory" })
|
||||
.setDescription(this.t(msg, "responses.radio.noStations"));
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
const input = (data.get("station")?.value ?? "").trim().toLowerCase();
|
||||
|
||||
@@ -100,7 +105,11 @@ export async function run(msg, data) {
|
||||
settled = true;
|
||||
unobserve();
|
||||
clearReactions().catch(() => {});
|
||||
listMsg.edit(this.t(msg, "responses.radio.timedOut")).catch(() => {});
|
||||
const timedOutEmbed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: this.t(msg, "responses.radio.stationsAuthor") || "24/7 Radio Station Directory" })
|
||||
.setDescription(this.t(msg, "responses.radio.timedOut"));
|
||||
listMsg.edit({ embeds: [timedOutEmbed] }).catch(() => {});
|
||||
}, 60_000);
|
||||
|
||||
const normalize = (s) => s.replace(/\uFE0F/g, "");
|
||||
@@ -114,7 +123,11 @@ export async function run(msg, data) {
|
||||
clearTimeout(timeout);
|
||||
unobserve();
|
||||
await clearReactions();
|
||||
listMsg.edit(this.t(msg, "responses.radio.cancelled")).catch(() => {});
|
||||
const cancelEmbed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: this.t(msg, "responses.radio.stationsAuthor") || "24/7 Radio Station Directory" })
|
||||
.setDescription(this.t(msg, "responses.radio.cancelled"));
|
||||
listMsg.edit({ embeds: [cancelEmbed] }).catch(() => {});
|
||||
return;
|
||||
}
|
||||
if (emoji === normalize(NEXT_EMOJI)) page = (page + 1) % totalPages;
|
||||
@@ -143,7 +156,11 @@ export async function run(msg, data) {
|
||||
const radio = radios.find(r => String(r.name ?? "").toLowerCase() === input);
|
||||
if (!radio) {
|
||||
const names = radios.map(r => `\`${r.name ?? "station"}\``).join(", ");
|
||||
return msg.reply(this.t(msg, "responses.radio.unknownStation", { station: input, stations: names }));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: this.t(msg, "responses.radio.stationsAuthor") || "24/7 Radio Station Directory" })
|
||||
.setDescription(this.t(msg, "responses.radio.unknownStation", { station: input, stations: names }));
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
return playStation(this, msg, radio);
|
||||
}
|
||||
@@ -180,13 +197,14 @@ async function playStation(ctx, msg, radio, editTarget = null) {
|
||||
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(0xe9196c)
|
||||
.setAuthor({ name: ctx.t(msg, "responses.radio.liveRadioAuthor") })
|
||||
.setTitle(`📻 ${stationName}`)
|
||||
.setDescription(
|
||||
stationLine +
|
||||
`${stationDesc}\n\n` +
|
||||
skipHint
|
||||
)
|
||||
;
|
||||
.setFooter({ text: ctx.t(msg, "responses.radio.webRadioFooter", { prefix }) });
|
||||
|
||||
if (editTarget) editTarget.edit({ embeds: [embed] }).catch(() => {});
|
||||
else msg.reply({ embeds: [embed] }).catch(() => {});
|
||||
|
||||
Reference in new issue
Block a user