mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
- 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.
47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
/**
|
|
* @module commands/invite
|
|
* @description Display the bot invite link and support server information.
|
|
*/
|
|
|
|
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 invite command.
|
|
*/
|
|
export const command = new CommandBuilder()
|
|
.setName("invite")
|
|
.setDescription("Get the invite link for Remix and the support server.", "commands.invite")
|
|
.addAliases("addbot", "remix")
|
|
.setCategory("util");
|
|
|
|
/**
|
|
* Run handler for the invite command.
|
|
* Sends an embed with the bot invite link and support server info.
|
|
*
|
|
* @param {object} message - The command message wrapper.
|
|
* @returns {Promise<void>}
|
|
*/
|
|
export async function run(message) {
|
|
const botUser = this.client?.user;
|
|
const botIcon = botUser?.displayAvatarURL?.() || null;
|
|
|
|
const embed = new EmbedBuilder()
|
|
.setColor(getGlobalColor())
|
|
.setAuthor({
|
|
name: this.t(message, "responses.invite.title"),
|
|
iconURL: botIcon
|
|
})
|
|
.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);
|
|
|
|
await message.reply({
|
|
embeds: [embed]
|
|
}).catch(() => {});
|
|
}
|