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
+3
-2
@@ -55,9 +55,10 @@ export async function run(msg, data) {
|
||||
default: {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(ERROR_COLOR)
|
||||
.setTitle("Debug — Unknown Target")
|
||||
.setAuthor({ name: this.t(msg, "responses.debug.author") })
|
||||
.setTitle(this.t(msg, "responses.debug.unknownTitle"))
|
||||
.setDescription(`Unknown debug target: \`${target}\`.\nValid options: \`voice\`, \`voice-rejoin\`, \`247-rejoin\`.`)
|
||||
;
|
||||
.setFooter({ text: this.t(msg, "responses.debug.footerHelp") });
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ async function processRejoinBatch(ctx, entries, statusMsg, title) {
|
||||
const icon = r.success ? "✅" : "❌";
|
||||
progressLines.push(`${icon} \`${r.label}\`${r.success ? ` — room:${r.roomState}` : ` — failed (${r.reason ?? "?"})`}`);
|
||||
}
|
||||
await statusMsg.edit({ embeds: [new EmbedBuilder().setColor(WARN_COLOR).setTitle(`Debug — ${title}`).setDescription(progressLines.join("\n").slice(0, MAX_DESC))] }).catch(() => {});
|
||||
await statusMsg.edit({ embeds: [new EmbedBuilder().setColor(WARN_COLOR).setAuthor({ name: this.t ? this.t(msg, "responses.debug.rejoinAuthor") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinAuthor") : "🛠️ Voice Rejoin Controller") }).setTitle(`Debug — ${title}`).setDescription(progressLines.join("\n").slice(0, MAX_DESC)).setFooter({ text: this.t ? this.t(msg, "responses.debug.rejoinFooter") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinFooter") : "Owner Diagnostics • Batch Rejoin") })] }).catch(() => {});
|
||||
|
||||
const result = await forceRejoinPlayer(ctx, player);
|
||||
result.label = label;
|
||||
@@ -197,7 +197,7 @@ function buildRejoinResultEmbed(results, title, noun) {
|
||||
}
|
||||
|
||||
const finalColor = failedCount === 0 ? SUCCESS_COLOR : DANGER_COLOR;
|
||||
return { embeds: [new EmbedBuilder().setColor(finalColor).setTitle(`Debug — ${title}`).setDescription(resultLines.join("\n").slice(0, MAX_DESC))] };
|
||||
return { embeds: [new EmbedBuilder().setColor(finalColor).setAuthor({ name: this.t ? this.t(msg, "responses.debug.rejoinAuthor") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinAuthor") : "🛠️ Voice Rejoin Controller") }).setTitle(`Debug — ${title}`).setDescription(resultLines.join("\n").slice(0, MAX_DESC)).setFooter({ text: this.t ? this.t(msg, "responses.debug.rejoinFooter") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinFooter") : "Owner Diagnostics • Batch Rejoin") })] };
|
||||
}
|
||||
/**
|
||||
* Run a batch rejoin operation on matching players.
|
||||
@@ -222,8 +222,10 @@ export async function runBatchRejoin(msg, key, title, noun, filter, showHintIfEm
|
||||
: "";
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(SUCCESS_COLOR)
|
||||
.setAuthor({ name: this.t ? this.t(msg, "responses.debug.rejoinAuthor") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinAuthor") : "🛠️ Voice Rejoin Controller") })
|
||||
.setTitle(`Debug — ${title}`)
|
||||
.setDescription(`No ${noun} found. All voice connections appear healthy.${hintLine}`)
|
||||
.setFooter({ text: this.t ? this.t(msg, "responses.debug.rejoinFooter") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinFooter") : "Owner Diagnostics • Batch Rejoin") })
|
||||
;
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
@@ -245,8 +247,10 @@ export async function runBatchRejoin(msg, key, title, noun, filter, showHintIfEm
|
||||
|
||||
const statusEmbed = new EmbedBuilder()
|
||||
.setColor(WARN_COLOR)
|
||||
.setAuthor({ name: this.t ? this.t(msg, "responses.debug.rejoinAuthor") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinAuthor") : "🛠️ Voice Rejoin Controller") })
|
||||
.setTitle(`Debug — ${title}`)
|
||||
.setDescription(statusLines.join("\n").slice(0, MAX_DESC))
|
||||
.setFooter({ text: this.t ? this.t(msg, "responses.debug.rejoinFooter") : (ctx.t ? ctx.t(msg, "responses.debug.rejoinFooter") : "Owner Diagnostics • Batch Rejoin") })
|
||||
;
|
||||
const statusMsg = await msg.reply({ embeds: [statusEmbed] });
|
||||
|
||||
|
||||
@@ -153,8 +153,10 @@ export async function runVoiceDiagnostic(msg) {
|
||||
const embedColor = ghostConnections.length > 0 ? DANGER_COLOR : getGlobalColor();
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(embedColor)
|
||||
.setAuthor({ name: this.t(msg, "responses.debug.voiceAuthor") })
|
||||
.setTitle(this.t(msg, "responses.debug.voiceTitle") + (ghostConnections.length > 0 ? ` — ${ghostConnections.length} Ghost(s) Detected!` : ""))
|
||||
.setDescription(pages[0].slice(0, MAX_DESC))
|
||||
.setFooter({ text: this.t(msg, "responses.debug.telemetryFooter") })
|
||||
;
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
@@ -176,6 +178,7 @@ export async function runVoiceDiagnostic(msg) {
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(embedColor)
|
||||
.setAuthor({ name: this.t(msg, "responses.debug.voiceAuthor") })
|
||||
.setTitle(this.t(msg, "responses.debug.voiceTitle") + titleSuffix + ` — ${pageLabel}`)
|
||||
.setDescription(pages[pageIdx].slice(0, MAX_DESC))
|
||||
.setFooter({ text: footerText })
|
||||
|
||||
@@ -248,6 +248,7 @@ export async function run(msg, data) {
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(isError ? ERROR_COLOR : getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.eval.author") })
|
||||
.setTitle(title)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: footerText })
|
||||
|
||||
+3
-9
@@ -34,15 +34,9 @@ export async function run(message) {
|
||||
name: this.t(message, "responses.invite.title"),
|
||||
iconURL: botIcon
|
||||
})
|
||||
.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" });
|
||||
.setTitle(this.t(message, "responses.invite.addRemixTitle"))
|
||||
.setDescription(this.t(message, "responses.invite.description"))
|
||||
.setFooter({ text: this.t(message, "responses.invite.footer") });
|
||||
|
||||
if (botIcon) embed.setThumbnail(botIcon);
|
||||
|
||||
|
||||
+20
-9
@@ -71,20 +71,27 @@ export async function run(msg, data) {
|
||||
if (userChannelId) targetChannelId = cleanId(userChannelId);
|
||||
}
|
||||
|
||||
const leaveNotice = (desc) => new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `👋 ${this.t(msg, "responses.leave.sessionEndedTitle")}` })
|
||||
.setDescription(desc);
|
||||
|
||||
if (!targetChannelId) {
|
||||
if (guildPlayers.length === 0) {
|
||||
return msg.reply(this.t(msg, "responses.leave.notInVoice"));
|
||||
return msg.reply({ embeds: [leaveNotice(this.t(msg, "responses.leave.notInVoice"))] });
|
||||
}
|
||||
const channelList = guildPlayers.map(([mapKey, p]) => {
|
||||
const id = cleanId(p._channelId ?? mapKey);
|
||||
return id ? `<#${id}>` : "\`unknown\`";
|
||||
});
|
||||
return msg.reply(
|
||||
return msg.reply({
|
||||
embeds: [leaveNotice(
|
||||
this.t(msg, "responses.leave.specifyChannel", {
|
||||
channels: channelList.map(c => `• ${c}`).join("\n"),
|
||||
prefix: this.handler.getPrefix(msg.message?.guildId ?? msg.channel?.guild?.id)
|
||||
})
|
||||
);
|
||||
)]
|
||||
});
|
||||
}
|
||||
|
||||
const player = this.players.playerMap.get(targetChannelId)
|
||||
@@ -95,29 +102,33 @@ export async function run(msg, data) {
|
||||
|
||||
if (!player) {
|
||||
if (guildPlayers.length === 0) {
|
||||
return msg.reply(this.t(msg, "responses.leave.notInVoice"));
|
||||
return msg.reply({ embeds: [leaveNotice(this.t(msg, "responses.leave.notInVoice"))] });
|
||||
}
|
||||
const channelList = guildPlayers.map(([mapKey, p]) => {
|
||||
const id = cleanId(p._channelId ?? mapKey);
|
||||
return id ? `<#${id}>` : "\`unknown\`";
|
||||
});
|
||||
if (!client?.channels?.get?.(targetChannelId)) {
|
||||
return msg.reply(
|
||||
return msg.reply({
|
||||
embeds: [leaveNotice(
|
||||
this.t(msg, "responses.leave.specifyChannel", {
|
||||
channels: channelList.map(c => `• ${c}`).join("\n"),
|
||||
prefix: this.handler.getPrefix(msg.message?.guildId ?? msg.channel?.guild?.id)
|
||||
})
|
||||
);
|
||||
)]
|
||||
});
|
||||
}
|
||||
return msg.reply(
|
||||
return msg.reply({
|
||||
embeds: [leaveNotice(
|
||||
this.t(msg, "responses.leave.noPlayerInChannel", {
|
||||
channel: targetChannelId,
|
||||
channels: channelList.map(c => `• ${c}`).join("\n")
|
||||
})
|
||||
);
|
||||
)]
|
||||
});
|
||||
}
|
||||
|
||||
if (!player?.connection) return msg.reply(this.t(msg, "responses.leave.playerNotInit"));
|
||||
if (!player?.connection) return msg.reply({ embeds: [leaveNotice(this.t(msg, "responses.leave.playerNotInit"))] });
|
||||
|
||||
const activeChannelId = cleanId(player._channelId) || targetChannelId;
|
||||
const homeChannelId = cleanId(player._home247Channel) || activeChannelId;
|
||||
|
||||
+17
-7
@@ -28,10 +28,15 @@ export const command = new CommandBuilder()
|
||||
*/
|
||||
export async function run(msg) {
|
||||
if (!isLogChannelEnabled()) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(
|
||||
"❌ The error-log channel is **disabled**.\n" +
|
||||
"Set `errorLogChannel.enabled` to `true` and `errorLogChannel.channelId` to your log channel ID in config.json, then restart the bot."
|
||||
);
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.logtest.author") })
|
||||
.setTitle(this.t(msg, "responses.logtest.disabledTitle"))
|
||||
.setDescription(
|
||||
"❌ The error-log channel is **disabled**.\n" +
|
||||
"Set `errorLogChannel.enabled` to `true` and `errorLogChannel.channelId` to your log channel ID in config.json, then restart the bot."
|
||||
)
|
||||
.setFooter({ text: this.t(msg, "responses.logtest.footerConfig") });
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -41,8 +46,13 @@ export async function run(msg) {
|
||||
`Manual test entry requested by ${who} — if you can read this in the log channel, error forwarding is working.`
|
||||
);
|
||||
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(
|
||||
"📨 Test entry queued — check the log channel; it should arrive within a few seconds."
|
||||
);
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.logtest.author") })
|
||||
.setTitle(this.t(msg, "responses.logtest.queuedTitle"))
|
||||
.setDescription(
|
||||
"📨 Test entry queued — check the log channel; it should arrive within a few seconds."
|
||||
)
|
||||
.setFooter({ text: this.t(msg, "responses.logtest.footerPipeline") });
|
||||
return msg.reply({ embeds: [embed] }).catch(() => {});
|
||||
}
|
||||
+2
-3
@@ -6,7 +6,6 @@
|
||||
import { CommandBuilder } from "../src/commands/index.mjs";
|
||||
import { logger } from "../src/core/Logger.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../src/ui/index.mjs";
|
||||
import { Utils } from "../src/utils/Utils.mjs";
|
||||
import { EMOJI_REMOVE_TIMEOUT } from "../src/utils/UI.mjs";
|
||||
|
||||
@@ -243,7 +242,7 @@ export async function run(message, data) {
|
||||
|
||||
const singleEmbed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: "🎤 Lyrics" })
|
||||
.setAuthor({ name: this.t(message, "responses.lyrics.lyricsAuthor") })
|
||||
.setTitle(Utils.truncate(displayTitle, 50))
|
||||
.setDescription(singleDesc.slice(0, MAX_DESC))
|
||||
.setFooter({ text: this.t(message, "responses.lyrics.sourceFooter", { source: result.source, lines: totalLines }) });
|
||||
@@ -268,7 +267,7 @@ export async function run(message, data) {
|
||||
|
||||
const b = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: "🎤 Lyrics" })
|
||||
.setAuthor({ name: this.t(message, "responses.lyrics.lyricsAuthor") })
|
||||
.setTitle(Utils.truncate(displayTitle, 50))
|
||||
.setDescription(desc.slice(0, MAX_DESC))
|
||||
.setFooter({ text: expired
|
||||
|
||||
+5
-4
@@ -27,23 +27,24 @@ export async function run(msg) {
|
||||
|
||||
const loadingEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription(this.t(msg, "responses.np.loading"))
|
||||
;
|
||||
.setAuthor({ name: this.t(msg, "responses.np.nowPlayingAuthor") })
|
||||
.setDescription(this.t(msg, "responses.np.loading"));
|
||||
const loadingMsg = await msg.reply({ embeds: [loadingEmbed] });
|
||||
|
||||
try {
|
||||
const data = await p.nowPlaying();
|
||||
if (!data?.msg && !data?.embed) {
|
||||
loadingMsg.edit({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses._common.nothingPlaying"))] }).catch(() => {});
|
||||
loadingMsg.edit({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setAuthor({ name: this.t(msg, "responses.np.nowPlayingAuthor") }).setDescription(this.t(msg, "responses._common.nothingPlaying"))] }).catch(() => {});
|
||||
return;
|
||||
}
|
||||
const embed = data.embed || new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.np.nowPlayingAuthor") })
|
||||
.setDescription(data.msg);
|
||||
if (!data.embed && data.image) embed.setThumbnail(data.image);
|
||||
|
||||
loadingMsg.edit({ embeds: [embed] }).catch(() => {});
|
||||
} catch (e) {
|
||||
loadingMsg.edit({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses._common.nothingPlaying"))] }).catch(() => {});
|
||||
loadingMsg.edit({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setAuthor({ name: this.t(msg, "responses.np.nowPlayingAuthor") }).setDescription(this.t(msg, "responses._common.nothingPlaying"))] }).catch(() => {});
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -26,7 +26,10 @@ export async function run(message) {
|
||||
|
||||
const current = p.queue.getCurrent();
|
||||
if (!p.connection || !current) {
|
||||
const embed = new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(message, "responses._common.nothingPlaying"));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `⏸️ ${this.t(message, "responses.pause.pausedTitle")}` })
|
||||
.setDescription(this.t(message, "responses._common.nothingPlaying"));
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -46,12 +46,12 @@ export async function run(message, data) {
|
||||
delete existingPayload.timescale;
|
||||
await p.applyFilter(existingPayload, Object.keys(existingPayload).length > 0 ? p.activeFilter : null);
|
||||
embed.setAuthor({ name: `🎵 ${this.t(message, "responses.pitch.pitchTitle")}` })
|
||||
.setTitle("1.0× Normal")
|
||||
.setTitle(this.t(message, "responses.pitch.normalRate"))
|
||||
.setDescription(this.t(message, "responses.pitch.reset"))
|
||||
.setFooter({ text: this.t(message, "responses.pitch.resetHint", { prefix }) });
|
||||
} else {
|
||||
embed.setAuthor({ name: `🎵 ${this.t(message, "responses.pitch.pitchTitle")}` })
|
||||
.setTitle("1.0× Normal")
|
||||
.setTitle(this.t(message, "responses.pitch.normalRate"))
|
||||
.setDescription(this.t(message, "responses.pitch.current", { pitch: "1.0", prefix }))
|
||||
.setFooter({ text: this.t(message, "responses.pitch.resetHint", { prefix }) });
|
||||
}
|
||||
|
||||
+9
-5
@@ -240,7 +240,8 @@ export async function run(message, data) {
|
||||
|
||||
const statusEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription(":mag_right: Loading direct stream...");
|
||||
.setAuthor({ name: this.t(message, "responses.play.streamPipelineAuthor") })
|
||||
.setDescription(this.t(message, "responses.play.loadingDirectStream"));
|
||||
let statusMsg = null;
|
||||
try { statusMsg = await message.reply({ embeds: [statusEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); }
|
||||
|
||||
@@ -255,7 +256,8 @@ export async function run(message, data) {
|
||||
|
||||
const statusEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription(":mag_right: Resolving stream via Lavalink...");
|
||||
.setAuthor({ name: this.t(message, "responses.play.streamPipelineAuthor") })
|
||||
.setDescription(this.t(message, "responses.play.resolvingLavalinkStream"));
|
||||
let statusMsg = null;
|
||||
try { statusMsg = await message.reply({ embeds: [statusEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); }
|
||||
|
||||
@@ -285,6 +287,7 @@ export async function run(message, data) {
|
||||
|
||||
const searchEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: `🔎 ${this.t(message, "responses.play.searching")}` })
|
||||
.setDescription(this.t(message, "responses.play.searching"));
|
||||
let statusMsg = null;
|
||||
try { statusMsg = await message.reply({ embeds: [searchEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); }
|
||||
@@ -302,6 +305,7 @@ export async function run(message, data) {
|
||||
|
||||
const searchEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: `🔎 ${this.t(message, "responses.play.searching")}` })
|
||||
.setDescription(this.t(message, "responses.play.searching"));
|
||||
let statusMsg = null;
|
||||
try { statusMsg = await message.reply({ embeds: [searchEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); }
|
||||
@@ -329,7 +333,7 @@ export async function run(message, data) {
|
||||
|
||||
if (!lowerQuery && resolveProvider && (resolveProvider === "lf" || resolveProvider === "lastfm")) {
|
||||
return message.reply({
|
||||
embeds: [new EmbedBuilder().setColor(ERROR_COLOR).setDescription([
|
||||
embeds: [new EmbedBuilder().setColor(ERROR_COLOR).setAuthor({ name: this.t(message, "responses.play.lastfmPlaybackAuthor") }).setDescription([
|
||||
`❌ Specify a Last.fm category after \`lf:\``,
|
||||
``,
|
||||
`**Available categories:**`,
|
||||
@@ -433,8 +437,8 @@ export async function run(message, data) {
|
||||
|
||||
const searchEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription(this.t(message, "responses.play.searching"))
|
||||
;
|
||||
.setAuthor({ name: `🔎 ${this.t(message, "responses.play.searching")}` })
|
||||
.setDescription(this.t(message, "responses.play.searching"));
|
||||
|
||||
let statusMsg = null;
|
||||
try {
|
||||
|
||||
@@ -100,7 +100,7 @@ export async function openLyricsViewer(bot, msg, player, refresh, session) {
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: "🎤 " + (bot.t(msg, "responses.lyrics.author") || "Lyrics") })
|
||||
.setAuthor({ name: bot.t(msg, "responses.lyrics.lyricsAuthor") })
|
||||
.setTitle(title)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: footerText });
|
||||
|
||||
@@ -57,8 +57,8 @@ export async function run(message, data) {
|
||||
|
||||
const searchEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription(this.t(message, "responses.playnext.searching"))
|
||||
;
|
||||
.setAuthor({ name: `🔎 ${this.t(message, "responses.playnext.searching")}` })
|
||||
.setDescription(this.t(message, "responses.playnext.searching"));
|
||||
|
||||
let statusMsg;
|
||||
try {
|
||||
|
||||
+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(() => {});
|
||||
|
||||
+2
-1
@@ -113,9 +113,10 @@ async function showPaged(msg, title, lines, pageSize = 14) {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t ? this.t(msg, "responses.reload.author") : "🔄 Module Hot Reload" })
|
||||
.setTitle(title)
|
||||
.setDescription(pages[n].join("\n") + (pages.length > 1 ? `\n\nPage **${n + 1}** / **${pages.length}**` : ""))
|
||||
|
||||
.setFooter({ text: this.t ? this.t(msg, "responses.reload.footer") : "Owner Diagnostics • Dynamic Module Loader" })
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
+4
-1
@@ -29,7 +29,10 @@ export async function run(message) {
|
||||
|
||||
const current = p.queue.getCurrent();
|
||||
if (!p.connection || !current) {
|
||||
const embed = new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(message, "responses._common.nothingPlaying"));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `▶️ ${this.t(message, "responses.resume.resumedTitle")}` })
|
||||
.setDescription(this.t(message, "responses._common.nothingPlaying"));
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
+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 }))] });
|
||||
}
|
||||
}
|
||||
@@ -30,9 +30,10 @@ export async function run(msg) {
|
||||
if (guilds.length === 0) {
|
||||
const emptyEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.servers.serversAuthor") })
|
||||
.setTitle(this.t(msg, "responses.servers.title", { count: 0 }))
|
||||
.setDescription(this.t(msg, "responses.servers.noServers"))
|
||||
;
|
||||
.setFooter({ text: this.t(msg, "responses.servers.listComplete") });
|
||||
return msg.reply({ embeds: [emptyEmbed] });
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ export async function run(message) {
|
||||
if (p.isEmpty()) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `🔀 ${this.t(message, "responses.shuffle.shuffledTitle")}` })
|
||||
.setDescription(this.t(message, "responses._common.nothingPlaying"));
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
+9
-3
@@ -7,7 +7,7 @@
|
||||
|
||||
import { CommandBuilder } from "../src/commands/index.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor, cleanId } from "../src/ui/index.mjs";
|
||||
import { cleanId } from "../src/ui/index.mjs";
|
||||
import { countHumansInChannel } from "../src/voice/VoiceStateResolver.mjs";
|
||||
import { Utils } from "../src/utils/Utils.mjs";
|
||||
|
||||
@@ -29,7 +29,10 @@ async function doSkip(ctx, message, p) {
|
||||
|
||||
const err = p.skip();
|
||||
if (!p.connection || !current) {
|
||||
const embed = new EmbedBuilder().setColor(0xe9196c).setDescription(err);
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `⏭️ ${ctx.t(message, "responses.skip.skippedTitle")}` })
|
||||
.setDescription(err);
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -81,7 +84,10 @@ export async function run(message) {
|
||||
|
||||
const current = p.queue.getCurrent();
|
||||
if (!p.connection || !current) {
|
||||
const embed = new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(message, "responses._common.nothingPlaying"));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `⏭️ ${this.t(message, "responses.skip.skippedTitle")}` })
|
||||
.setDescription(this.t(message, "responses._common.nothingPlaying"));
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -46,12 +46,12 @@ export async function run(message, data) {
|
||||
delete existingPayload.timescale;
|
||||
await p.applyFilter(existingPayload, Object.keys(existingPayload).length > 0 ? p.activeFilter : null);
|
||||
embed.setAuthor({ name: `⏩ ${this.t(message, "responses.speed.speedTitle")}` })
|
||||
.setTitle("1.0× Normal")
|
||||
.setTitle(this.t(message, "responses.speed.normalRate"))
|
||||
.setDescription(this.t(message, "responses.speed.reset"))
|
||||
.setFooter({ text: this.t(message, "responses.speed.resetHint", { prefix }) });
|
||||
} else {
|
||||
embed.setAuthor({ name: `⏩ ${this.t(message, "responses.speed.speedTitle")}` })
|
||||
.setTitle("1.0× Normal")
|
||||
.setTitle(this.t(message, "responses.speed.normalRate"))
|
||||
.setDescription(this.t(message, "responses.speed.current", { speed: "1.0", prefix }))
|
||||
.setFooter({ text: this.t(message, "responses.speed.resetHint", { prefix }) });
|
||||
}
|
||||
|
||||
@@ -27,17 +27,12 @@ export function run(msg) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({
|
||||
name: "Remix Support Community",
|
||||
name: this.t(msg, "responses.support.title"),
|
||||
iconURL: botIcon
|
||||
})
|
||||
.setTitle(this.t(msg, "responses.support.title"))
|
||||
.setDescription(
|
||||
"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" });
|
||||
.setTitle("Remix HQ (fluxer.gg/remix)")
|
||||
.setDescription(this.t(msg, "responses.support.description"))
|
||||
.setFooter({ text: "fluxer.gg/remix" });
|
||||
|
||||
if (botIcon) embed.setThumbnail(botIcon);
|
||||
msg.reply({ embeds: [embed] }).catch(() => {});
|
||||
|
||||
+11
-3
@@ -26,7 +26,10 @@ export const command = new CommandBuilder()
|
||||
export async function run(msg, data) {
|
||||
const guild = msg.channel?.channel?.guild ?? msg.message?.guild;
|
||||
if (!guild) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.test.notInServer"));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.test.author") })
|
||||
.setDescription(this.t(msg, "responses.test.notInServer"));
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -54,7 +57,11 @@ export async function run(msg, data) {
|
||||
}
|
||||
|
||||
if (channelCounts.size === 0) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.test.noOneInVoice"));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.test.author") })
|
||||
.setDescription(this.t(msg, "responses.test.noOneInVoice"))
|
||||
.setFooter({ text: this.t(msg, "responses.test.footerZero") });
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -93,8 +100,9 @@ export async function run(msg, data) {
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.test.author") })
|
||||
.setTitle(this.t(msg, "responses.test.title"))
|
||||
.setDescription(desc.trim().slice(0, 4096))
|
||||
;
|
||||
.setFooter({ text: this.t(msg, "responses.test.footerCount", { count: channelCounts.size }) });
|
||||
msg.reply({ embeds: [embed] }).catch(() => {});
|
||||
}
|
||||
@@ -29,6 +29,7 @@ export async function run(msg) {
|
||||
if (!current) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `🖼️ ${this.t(msg, "responses.thumbnail.thumbTitle")}` })
|
||||
.setDescription(this.t(msg, "responses._common.nothingPlaying"));
|
||||
return msg.reply({ embeds: [embed] }).catch(() => {});
|
||||
}
|
||||
@@ -36,6 +37,7 @@ export async function run(msg) {
|
||||
if (!current.thumbnail) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `🖼️ ${this.t(msg, "responses.thumbnail.thumbTitle")}` })
|
||||
.setDescription(this.t(msg, "responses.thumbnail.noArtwork"));
|
||||
return msg.reply({ embeds: [embed] }).catch(() => {});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user