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
+12
-7
@@ -32,32 +32,37 @@ export async function run(msg, data) {
|
||||
const p = await this.getPlayer(msg, true, true, false);
|
||||
if (!p) return;
|
||||
|
||||
const seekNotice = (desc) => new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `⏩ ${this.t(msg, "responses.seek.seekTitle")}` })
|
||||
.setDescription(desc);
|
||||
|
||||
if (!p.queue?.getCurrent()) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(msg, "responses.seek.nothingPlaying"))] });
|
||||
return msg.reply({ embeds: [seekNotice(this.t(msg, "responses.seek.nothingPlaying"))] });
|
||||
}
|
||||
|
||||
if (p._paused) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(msg, "responses.seek.paused"))] });
|
||||
return msg.reply({ embeds: [seekNotice(this.t(msg, "responses.seek.paused"))] });
|
||||
}
|
||||
|
||||
const current = p.queue.getCurrent();
|
||||
|
||||
if (current?.type === "radio" || current?.isLive || p._getTrackDurationMs(current) === 0) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(msg, "responses.seek.live"))] });
|
||||
return msg.reply({ embeds: [seekNotice(this.t(msg, "responses.seek.live"))] });
|
||||
}
|
||||
|
||||
const trimmed = String(positionInput ?? "").trim();
|
||||
const isZero = /^0+(:0+)?(:0+)?$/.test(trimmed);
|
||||
const seekMs = isZero ? 0 : Utils.parseDuration(trimmed);
|
||||
if (seekMs === null || isNaN(seekMs) || seekMs < 0 || (!isZero && seekMs === 0)) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(msg, "responses.seek.invalidFormat"))] });
|
||||
return msg.reply({ embeds: [seekNotice(this.t(msg, "responses.seek.invalidFormat"))] });
|
||||
}
|
||||
|
||||
const trackDuration = p._getTrackDurationMs(p.queue.getCurrent());
|
||||
|
||||
if (trackDuration > 0 && seekMs >= trackDuration) {
|
||||
const maxStr = Utils.prettifyMS(trackDuration);
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(msg, "responses.seek.exceedsDuration", { duration: maxStr }))] });
|
||||
return msg.reply({ embeds: [seekNotice(this.t(msg, "responses.seek.exceedsDuration", { duration: maxStr }))] });
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -91,9 +96,9 @@ export async function run(msg, data) {
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
} else {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(msg, "responses.seek.notSupported"))] });
|
||||
return msg.reply({ embeds: [seekNotice(this.t(msg, "responses.seek.notSupported"))] });
|
||||
}
|
||||
} catch (err) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(msg, "responses.seek.failed", { error: err.message }))] });
|
||||
return msg.reply({ embeds: [seekNotice(this.t(msg, "responses.seek.failed", { error: err.message }))] });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user