mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
lots of stuff noo need to say it lol
This commit is contained in:
1 parent
584ca05e2d
commit
7458df401e
9 files changed
+355
-58
No files matched your search
+300
-28
@@ -10,6 +10,19 @@ function embed(desc, opts = {}) {
|
||||
return { embeds: [b] };
|
||||
}
|
||||
|
||||
/** Build a rich embed with fields for the 24/7 status panel */
|
||||
function richEmbed(fields, opts = {}) {
|
||||
const b = new EmbedBuilder().setColor(getGlobalColor());
|
||||
if (opts.title) b.setTitle(opts.title);
|
||||
if (opts.description) b.setDescription(opts.description);
|
||||
if (opts.footer) b.setFooter({ text: opts.footer });
|
||||
if (opts.iconURL) b.setAuthor({ name: opts.title || "\u200b", iconURL: opts.iconURL });
|
||||
for (const f of fields) {
|
||||
b.addField(f.name, f.value, f.inline ?? false);
|
||||
}
|
||||
return { embeds: [b] };
|
||||
}
|
||||
|
||||
// ── Constants ─────────────────────────────────────────────────────────────────
|
||||
|
||||
const SHORTCUTS = {
|
||||
@@ -162,13 +175,238 @@ function save247Channels(set, channels) {
|
||||
}
|
||||
|
||||
function modeLabel(mode) {
|
||||
return mode === "auto" ? "🔄 auto" : mode === "on" ? "✅ on" : "❌ off";
|
||||
return mode === "auto" ? "🔄 Auto" : mode === "on" ? "✅ On" : "❌ Off";
|
||||
}
|
||||
|
||||
function modeEmoji(mode) {
|
||||
return mode === "auto" ? "🔄" : mode === "on" ? "✅" : "❌";
|
||||
}
|
||||
|
||||
function modeColor(mode) {
|
||||
return mode === "auto" ? 0xF59E0B : mode === "on" ? 0x10B981 : 0xEF4444;
|
||||
}
|
||||
|
||||
function modeDescription(mode, prefix) {
|
||||
if (mode === "on") return `Stays connected permanently. Won't rejoin after \`${prefix}leave\`.`;
|
||||
if (mode === "auto") return `Stays connected & auto-rejoins after \`${prefix}leave\` or disconnect.`;
|
||||
return "24/7 disabled — leaves after inactivity.";
|
||||
}
|
||||
|
||||
/** Resolve a channel name from cache, falling back to mention */
|
||||
function resolveChannelName(client, channelId) {
|
||||
try {
|
||||
const ch = client?.channels?.get?.(channelId);
|
||||
if (ch?.name) return ch.name;
|
||||
} catch (_) {}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a rich 24/7 status panel with per-channel details.
|
||||
* Shows each saved channel with its mode, player status, and member count.
|
||||
* Uses color-coded sections and a clean visual layout.
|
||||
*/
|
||||
function build247StatusPanel(set, ctx, message) {
|
||||
const channels = [...get247Channels(set)];
|
||||
const prefix = (() => {
|
||||
try { return set.get("prefix") ?? "%"; } catch (_) { return "%"; }
|
||||
})();
|
||||
|
||||
if (channels.length === 0) {
|
||||
return richEmbed([
|
||||
{
|
||||
name: "Getting Started",
|
||||
value:
|
||||
"Join a voice channel and run one of:\n" +
|
||||
`• \`${prefix}247 on\` — stay permanently, no auto-rejoin\n` +
|
||||
`• \`${prefix}247 auto\` — stay + auto-rejoin after leave/disconnect\n\n` +
|
||||
"Each channel in your server can have its own 24/7 mode.",
|
||||
inline: false,
|
||||
},
|
||||
], {
|
||||
title: "♾️ 24/7 Mode",
|
||||
description: "No voice channels are saved for 24/7.",
|
||||
footer: `${prefix}247 on | ${prefix}247 auto | ${prefix}247 off`,
|
||||
});
|
||||
}
|
||||
|
||||
const fields = [];
|
||||
const guildId = getGuildId(message);
|
||||
|
||||
for (let i = 0; i < channels.length; i++) {
|
||||
const chId = channels[i];
|
||||
const mode = get247ChannelMode(set, chId);
|
||||
const chName = resolveChannelName(ctx.client, chId);
|
||||
const displayName = chName ? `**${chName}** <#${chId}>` : `<#${chId}>`;
|
||||
|
||||
// Player status
|
||||
let statusLine = "⚪ Not connected";
|
||||
let trackLine = "";
|
||||
let memberInfo = "";
|
||||
try {
|
||||
const player = ctx.players?.playerMap?.get(chId);
|
||||
if (player && !player._destroyed) {
|
||||
const currentTrack = player.queue?.getCurrent?.();
|
||||
if (currentTrack) {
|
||||
const title = currentTrack.title ?? currentTrack.uri ?? "Unknown";
|
||||
statusLine = "🟢 Playing";
|
||||
trackLine = `\n🎵 **${title.length > 45 ? title.slice(0, 42) + "..." : title}**`;
|
||||
} else {
|
||||
statusLine = "🟡 Connected";
|
||||
trackLine = "\nWaiting for music...";
|
||||
}
|
||||
|
||||
// Count members in the channel
|
||||
if (guildId && ctx.observedVoiceUsers) {
|
||||
let humans = 0;
|
||||
for (const [, info] of ctx.observedVoiceUsers) {
|
||||
if (String(info.channelId).replace(/\D/g, "") === chId &&
|
||||
String(info.guildId).replace(/\D/g, "") === String(guildId).replace(/\D/g, "")) {
|
||||
humans++;
|
||||
}
|
||||
}
|
||||
memberInfo = humans > 0 ? ` 👤 ${humans}` : " 👤 0";
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
fields.push({
|
||||
name: `${modeEmoji(mode)} ${displayName}`,
|
||||
value:
|
||||
`**Mode:** ${modeLabel(mode)} — ${modeDescription(mode, prefix)}\n` +
|
||||
`${statusLine}${memberInfo}${trackLine}`,
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
// Summary bar
|
||||
const onCount = channels.filter(id => get247ChannelMode(set, id) === "on").length;
|
||||
const autoCount = channels.filter(id => get247ChannelMode(set, id) === "auto").length;
|
||||
const modeSummary = [];
|
||||
if (onCount > 0) modeSummary.push(`✅ ${onCount} on`);
|
||||
if (autoCount > 0) modeSummary.push(`🔄 ${autoCount} auto`);
|
||||
if (modeSummary.length === 0) modeSummary.push("❌ all off");
|
||||
|
||||
const summaryLine = channels.length === 1
|
||||
? "1 channel saved"
|
||||
: `${channels.length} channels saved`;
|
||||
|
||||
return richEmbed(fields, {
|
||||
title: "♾️ 24/7 Mode",
|
||||
description: `**${summaryLine}** — ${modeSummary.join(" · ")}`,
|
||||
footer: `${prefix}247 on | ${prefix}247 auto | ${prefix}247 off`,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a rich embed for the %247 on/auto confirmation.
|
||||
* Uses color coding based on the mode selected.
|
||||
*/
|
||||
function build247EnabledPanel(set, channelId, mode, joined, ctx, guildId) {
|
||||
const channels = [...get247Channels(set)];
|
||||
const modeStr = mode === "auto" ? "🔄 Auto" : "✅ On";
|
||||
const prefix = (() => {
|
||||
try { return set.get("prefix") ?? "%"; } catch (_) { return "%"; }
|
||||
})();
|
||||
const chName = resolveChannelName(ctx.client, channelId);
|
||||
const displayName = chName ? `**${chName}** <#${channelId}>` : `<#${channelId}>`;
|
||||
|
||||
const fields = [];
|
||||
|
||||
// Primary channel that was just set
|
||||
const connectStatus = joined
|
||||
? "🟢 **Bot joined and connected!**"
|
||||
: "🟡 Mode updated (player was already active)";
|
||||
|
||||
fields.push({
|
||||
name: `${modeEmoji(mode)} ${displayName}`,
|
||||
value: `**Mode:** ${modeStr}\n${modeDescription(mode, prefix)}\n${connectStatus}`,
|
||||
inline: false,
|
||||
});
|
||||
|
||||
// Show other saved channels if any
|
||||
const otherChannels = channels.filter(id => id !== channelId);
|
||||
if (otherChannels.length > 0) {
|
||||
const otherLines = otherChannels.map(id => {
|
||||
const m = get247ChannelMode(set, id);
|
||||
const name = resolveChannelName(ctx.client, id);
|
||||
const label = name ? `${name}` : `<#${id}>`;
|
||||
return `${modeEmoji(m)} ${label} — ${modeLabel(m)}`;
|
||||
});
|
||||
fields.push({
|
||||
name: `📋 Other Channels (${otherChannels.length})`,
|
||||
value: otherLines.join("\n"),
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
const summary = channels.length === 1
|
||||
? "1 channel saved"
|
||||
: `${channels.length} channels saved`;
|
||||
|
||||
// Use the mode's color for the embed
|
||||
const b = new EmbedBuilder();
|
||||
b.setColor(modeColor(mode));
|
||||
b.setTitle(`♾️ 24/7 ${modeStr}`);
|
||||
b.setDescription(`**${summary}** for this server`);
|
||||
b.setFooter({ text: `${prefix}247 off to disable for a channel` });
|
||||
for (const f of fields) b.addField(f.name, f.value, f.inline ?? false);
|
||||
return { embeds: [b] };
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a rich embed for the %247 off confirmation.
|
||||
*/
|
||||
function build247DisabledPanel(set, channelId, guildId) {
|
||||
const channels = [...get247Channels(set)];
|
||||
const prefix = (() => {
|
||||
try { return set.get("prefix") ?? "%"; } catch (_) { return "%"; }
|
||||
})();
|
||||
|
||||
const fields = [];
|
||||
|
||||
// The channel that was removed
|
||||
fields.push({
|
||||
name: `❌ <#${channelId}>`,
|
||||
value: "24/7 mode **disabled** — bot has left this channel.",
|
||||
inline: false,
|
||||
});
|
||||
|
||||
// Show remaining saved channels if any
|
||||
if (channels.length > 0) {
|
||||
const remainingLines = channels.map(id => {
|
||||
const m = get247ChannelMode(set, id);
|
||||
return `${modeEmoji(m)} <#${id}> — ${modeLabel(m)}`;
|
||||
});
|
||||
fields.push({
|
||||
name: `📋 Remaining (${channels.length})`,
|
||||
value: remainingLines.join("\n"),
|
||||
inline: false,
|
||||
});
|
||||
} else {
|
||||
fields.push({
|
||||
name: "📋 No Channels Saved",
|
||||
value:
|
||||
"All 24/7 channels have been removed.\n" +
|
||||
"The bot will leave voice after inactivity.",
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
const summary = channels.length === 0
|
||||
? "No channels saved"
|
||||
: `${channels.length} channel${channels.length !== 1 ? "s" : ""} remaining`;
|
||||
|
||||
return richEmbed(fields, {
|
||||
title: "♾️ 24/7 Disabled",
|
||||
description: `**${summary}**`,
|
||||
footer: `${prefix}247 on | ${prefix}247 auto to re-enable`,
|
||||
});
|
||||
}
|
||||
|
||||
function format247Status(set) {
|
||||
const channels = get247Channels(set);
|
||||
if (channels.size === 0) return "❌ disabled";
|
||||
// Show per-channel mode for multi-voice, single mode for single channel
|
||||
if (channels.size === 0) return "❌ Disabled";
|
||||
if (channels.size === 1) {
|
||||
const chId = [...channels][0];
|
||||
const mode = get247ChannelMode(set, chId);
|
||||
@@ -186,7 +424,7 @@ function format247Summary(set) {
|
||||
if (channels.length === 0) {
|
||||
return [
|
||||
"**24/7 Mode**",
|
||||
"Status: ❌ disabled",
|
||||
"Status: ❌ Disabled",
|
||||
"Saved channels: none"
|
||||
].join("\n");
|
||||
}
|
||||
@@ -203,7 +441,7 @@ function prettifySettingLabel(key) {
|
||||
const custom = {
|
||||
songAnnouncements: "Song announcements",
|
||||
prefix: "Prefix",
|
||||
pfp: "Bot avatar style",
|
||||
pfx: "Bot avatar style",
|
||||
locale: "Locale",
|
||||
stay_247: "24/7 mode",
|
||||
volume: "Default volume",
|
||||
@@ -253,11 +491,7 @@ async function handle247(ctx, message, value) {
|
||||
await player.leave().catch(() => {});
|
||||
player.destroy();
|
||||
}
|
||||
const remaining = [...channels];
|
||||
const extra = remaining.length > 0
|
||||
? `\nSaved channels left: ${remaining.map(ch => `<#${ch}> (${modeLabel(get247ChannelMode(set, ch))})`).join(", ")}`
|
||||
: "";
|
||||
return message.reply(embed(ctx.t(message, "responses.settings.247Disabled", { channel: id }) + extra));
|
||||
return message.reply(build247DisabledPanel(set, id, guildId));
|
||||
}
|
||||
|
||||
// Not in a channel — disable all for this guild
|
||||
@@ -274,7 +508,18 @@ async function handle247(ctx, message, value) {
|
||||
player.destroy();
|
||||
}
|
||||
}
|
||||
return message.reply(embed(ctx.t(message, "responses.settings.247DisabledAll")));
|
||||
const prefix = (() => {
|
||||
try { return set.get("prefix") ?? "%"; } catch (_) { return "%"; }
|
||||
})();
|
||||
return message.reply(richEmbed([{
|
||||
name: "❌ All Channels",
|
||||
value: "24/7 mode **disabled** for all channels in this server.\nThe bot will leave voice after inactivity.",
|
||||
inline: false,
|
||||
}], {
|
||||
title: "♾️ 24/7 Disabled",
|
||||
description: "No channels saved",
|
||||
footer: `${prefix}247 on | ${prefix}247 auto to re-enable`,
|
||||
}));
|
||||
}
|
||||
|
||||
// ── ON / AUTO ─────────────────────────────────────────────────────────────
|
||||
@@ -294,25 +539,52 @@ async function handle247(ctx, message, value) {
|
||||
// Per-channel mode: each channel gets its own on/auto setting
|
||||
set247ChannelMode(set, id, resolved);
|
||||
|
||||
const resolvedLabel = resolved === "auto" ? "**auto**" : "**on**";
|
||||
const savedSummary = channels.size === 1
|
||||
? `Saved channel: <#${id}> (${resolvedLabel})`
|
||||
: `Saved channels (${channels.size}): ${[...channels].map(ch => `<#${ch}> (${modeLabel(get247ChannelMode(set, ch))})`).join(", ")}`;
|
||||
const playerExists = ctx.players.playerMap.has(id) ||
|
||||
[...ctx.players.playerMap.values()].some(p =>
|
||||
cleanId(p?._channelId ?? "") === id && cleanId(p?._guildId ?? "") === cleanId(guildId)
|
||||
);
|
||||
|
||||
if (
|
||||
ctx.players.playerMap.has(id) ||
|
||||
[...ctx.players.playerMap.values()].some(p =>
|
||||
cleanId(p?._channelId ?? "") === id && cleanId(p?._guildId ?? "") === cleanId(guildId)
|
||||
)
|
||||
) {
|
||||
return message.reply(embed(ctx.t(message, "responses.settings.247Set", { mode: resolvedLabel, channel: id, summary: savedSummary })));
|
||||
if (playerExists) {
|
||||
return message.reply(build247EnabledPanel(set, id, resolved, false, ctx, guildId));
|
||||
}
|
||||
|
||||
try {
|
||||
await ctx._spawnPlayer(guildId, id);
|
||||
return message.reply(embed(ctx.t(message, "responses.settings.247Joined", { mode: resolvedLabel, channel: id, summary: savedSummary })));
|
||||
return message.reply(build247EnabledPanel(set, id, resolved, true, ctx, guildId));
|
||||
} catch (e) {
|
||||
return message.reply(embed(ctx.t(message, "responses.settings.247JoinFailed", { channel: id, error: e.message, summary: savedSummary })));
|
||||
// Show error in a rich panel
|
||||
const channels2 = [...get247Channels(set)];
|
||||
const otherChannels = channels2.filter(ch => ch !== id);
|
||||
const prefix = (() => {
|
||||
try { return set.get("prefix") ?? "%"; } catch (_) { return "%"; }
|
||||
})();
|
||||
const chName = resolveChannelName(ctx.client, id);
|
||||
const displayName = chName ? `**${chName}** <#${id}>` : `<#${id}>`;
|
||||
const fields = [
|
||||
{
|
||||
name: `⚠️ ${displayName}`,
|
||||
value: `**Mode:** ${modeLabel(resolved)} — saved, but failed to join\nError: \`${e.message}\``,
|
||||
inline: false,
|
||||
},
|
||||
];
|
||||
if (otherChannels.length > 0) {
|
||||
const otherLines = otherChannels.map(ch => {
|
||||
const m = get247ChannelMode(set, ch);
|
||||
const name2 = resolveChannelName(ctx.client, ch);
|
||||
const label = name2 ? name2 : `<#${ch}>`;
|
||||
return `${modeEmoji(m)} ${label} — ${modeLabel(m)}`;
|
||||
});
|
||||
fields.push({
|
||||
name: `📋 Other Channels (${otherChannels.length})`,
|
||||
value: otherLines.join("\n"),
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
return message.reply(richEmbed(fields, {
|
||||
title: "♾️ 24/7 — Join Failed",
|
||||
description: `The channel was saved but the bot couldn't connect. Try \`${prefix}join\` or \`${prefix}play\` later.`,
|
||||
footer: `${prefix}247 off to remove a failed channel`,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,10 +663,10 @@ async function applySet(ctx, message, set, key, rawValue) {
|
||||
async function handleShortcut(ctx, message, settingKey, valueTokens) {
|
||||
const set = ctx.getSettings(message);
|
||||
|
||||
// GET (no value provided)
|
||||
// GET (no value provided) — show rich 24/7 panel
|
||||
if (valueTokens.length === 0) {
|
||||
if (settingKey === "stay_247") {
|
||||
return message.reply(embed(ctx.t(message, "responses.settings.247Status", { status: format247Status(set) })));
|
||||
return message.reply(build247StatusPanel(set, ctx, message));
|
||||
}
|
||||
const val = set.get(settingKey);
|
||||
return message.reply(embed(`\`${settingKey}\` → ${displayValue(settingKey, val)}`));
|
||||
@@ -565,7 +837,7 @@ export async function run(message, data) {
|
||||
if (cmd === "getSettings") {
|
||||
if (settingKey) {
|
||||
if (settingKey === "stay_247") {
|
||||
return message.reply(embed(format247Summary(set)));
|
||||
return message.reply(build247StatusPanel(set, this, message));
|
||||
}
|
||||
const val = set.get(settingKey);
|
||||
const description = this.settingsMgr.descriptions?.[settingKey];
|
||||
@@ -645,7 +917,7 @@ export async function run(message, data) {
|
||||
} else if (BOOL_SETTINGS.has(settingKey)) {
|
||||
extra = `\n**Valid values:** \`true\`, \`false\`, \`on\`, \`off\``;
|
||||
} else if (settingKey === "stay_247") {
|
||||
extra = `\n**Valid values:** \`off\`, \`on\`, \`auto\`\n**Tip:** You can save more than one voice channel in the same server.`;
|
||||
extra = `\n**Valid values:** \`off\`, \`on\`, \`auto\`\n\n**Modes:**\n• \`on\` — Stays connected permanently. Won't rejoin after \`${pfx}leave\`.\n• \`auto\` — Stays connected & auto-rejoins after \`${pfx}leave\` or disconnect.\n• \`off\` — Leaves after inactivity.\n\n**Multi-Voice:** You can save multiple voice channels in the same server. Each channel has its own mode.`;
|
||||
}
|
||||
|
||||
return message.reply(embed(
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as fs from "fs";
|
||||
import path from "path";
|
||||
import { initLogger, logger } from "./src/constants/Logger.mjs";
|
||||
import { Client, Events } from "@fluxerjs/core";
|
||||
import { get247ChannelMode, remove247ChannelMode } from "./src/constants/Helpers247.mjs";
|
||||
import { CommandHandler, CommandLoader, PrefixManager } from "./src/CommandHandler.mjs";
|
||||
import { MessageHandler, PageBuilder, HelpCommand, setGlobalColor } from "./src/MessageHandler.mjs";
|
||||
import { RemoteSettingsManager } from "./src/Settings.mjs";
|
||||
@@ -519,7 +520,6 @@ export class Remix {
|
||||
const cleanId = String(channelId).replace(/\D/g, "");
|
||||
const set = this.settingsMgr.getServer(guildId);
|
||||
const raw = set.get("stay_247");
|
||||
const mode = set.get("stay_247_mode") ?? "auto";
|
||||
|
||||
const channels = (!raw || raw === "none")
|
||||
? new Set()
|
||||
@@ -527,8 +527,11 @@ export class Remix {
|
||||
? new Set(raw.map(id => String(id).replace(/\D/g, "")).filter(Boolean))
|
||||
: new Set([String(raw).replace(/\D/g, "")]);
|
||||
|
||||
// Use per-channel mode (not the guild-wide legacy mode)
|
||||
const channelMode = channels.has(cleanId) ? get247ChannelMode(set, cleanId) : "off";
|
||||
|
||||
if (channels.has(cleanId) && !force) {
|
||||
if (mode === "auto") {
|
||||
if (channelMode === "auto") {
|
||||
if (message) {
|
||||
message.replyEmbed(
|
||||
`⚠️ 24/7 mode is enabled (auto) — I'll rejoin <#${cleanId}> in a few seconds.\n` +
|
||||
@@ -542,7 +545,8 @@ export class Remix {
|
||||
if (channels.has(cleanId)) {
|
||||
channels.delete(cleanId);
|
||||
set.set("stay_247", channels.size > 0 ? [...channels] : "none");
|
||||
if (channels.size === 0) set.set("stay_247_mode", "off");
|
||||
// Also clean up the per-channel mode entry (prevents orphaned mode data)
|
||||
remove247ChannelMode(set, cleanId, channels);
|
||||
}
|
||||
|
||||
this.markIntentionalLeave(cleanId);
|
||||
|
||||
@@ -799,6 +799,15 @@ export class GatewayHandler {
|
||||
channels.delete(cleanOld);
|
||||
channels.add(cleanId);
|
||||
set.set("stay_247", [...channels]);
|
||||
|
||||
// Also migrate the per-channel mode from old → new channel
|
||||
const modes = set.get("stay_247_modes");
|
||||
if (modes && typeof modes === "object" && !Array.isArray(modes) && modes[cleanOld]) {
|
||||
modes[cleanId] = modes[cleanOld];
|
||||
delete modes[cleanOld];
|
||||
set.set("stay_247_modes", modes);
|
||||
}
|
||||
|
||||
logger.voice247(`[247] Updated stay_247: ${cleanOld} → ${cleanId}`);
|
||||
}
|
||||
}
|
||||
@@ -843,6 +852,17 @@ export class GatewayHandler {
|
||||
logger.voice247(`[247] Channel ${cleanOld} mode='${mode}' — not rejoining.`);
|
||||
channels.delete(cleanOld);
|
||||
set.set("stay_247", channels.size > 0 ? [...channels] : "none");
|
||||
// Also clean up the per-channel mode entry
|
||||
const modes = set.get("stay_247_modes");
|
||||
if (modes && typeof modes === "object" && !Array.isArray(modes)) {
|
||||
delete modes[cleanOld];
|
||||
set.set("stay_247_modes", modes);
|
||||
}
|
||||
if (channels.size === 0) set.set("stay_247_mode", "off");
|
||||
else {
|
||||
const first = [...channels][0];
|
||||
set.set("stay_247_mode", modes?.[first] ?? "auto");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,8 @@ export class RecoveryManager {
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription(
|
||||
`Left channel <#${activeChannelId}> because of inactivity.\n` +
|
||||
`If you want me to stay in voice, use \`${prefix}247 on/auto\``
|
||||
`If you want me to stay in voice, use \`${prefix}247 on\` or \`${prefix}247 auto\`\n` +
|
||||
`💡 Use \`${prefix}247\` to view and manage all saved channels.`
|
||||
)
|
||||
.toJSON();
|
||||
if (typeof ch?.send === "function") ch.send({ embeds: [embed] }).catch(() => {});
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
"invalidLocale": "❌ `{{locale}}` ليست لغة مدعومة.\nاللغات المتاحة: {{locales}}",
|
||||
"prefixLength": "❌ يجب أن يكون البادئة بين **1** و **5** أحرف.",
|
||||
"prefixSpaces": "❌ لا يمكن أن تحتوي البادئة على مسافات.",
|
||||
"invalid247": "❌ قيمة غير صالحة `{{value}}` لوضع 24/7.\n\n**الخيارات الصالحة:**\n• `off` — البوت يغادر بعد عدم النشاط\n• `on` — البوت يبقى نشطاً في قائمة القنوات المحفوظة\n• `auto` — البوت يبقى نشطاً ويحافظ على قائمة القنوات المحفوظة جاهزة للاسترداد",
|
||||
"invalid247": "❌ Invalid value `{{value}}` for 24/7 mode.\n\n**Valid options:**\n• `on` — Bot stays connected permanently. Won't rejoin after `%leave`.\n• `auto` — Bot stays connected and auto-rejoins after `%leave` or disconnect.\n• `off` — Bot leaves after inactivity.\n\n💡 Each channel has its own mode. Use `%247` to see all saved channels.",
|
||||
"noServer": "❌ لم أتمكن من تحديد خادمك.",
|
||||
"noVoice247": "❌ أنت لست في قناة صوتية. انضم إلى واحدة أولاً، ثم شغّل `%247 {{mode}}` مرة أخرى.",
|
||||
"247Disabled": "✅ وضع 24/7 **معطّل** لـ <#{{channel}}. غادر البوت.",
|
||||
@@ -427,7 +427,7 @@
|
||||
"247Set": "✅ تم تعيين وضع 24/7 إلى **{{mode}}** لـ <#{{channel}}>.\n{{summary}}",
|
||||
"247Joined": "✅ تم تعيين وضع 24/7 إلى **{{mode}}** لـ <#{{channel}}>. انضم البوت!\n{{summary}}",
|
||||
"247JoinFailed": "✅ تم حفظ وضع 24/7 لـ <#{{channel}}>، لكن فشل الانضمام: {{error}}\n{{summary}}",
|
||||
"247Status": "وضع 24/7: {{status}}",
|
||||
"247Status": "♾️ **24/7 Mode**: {{status}}\n\nUse `%247 on` or `%247 auto` to enable — `%247 off` to disable.",
|
||||
"helpTitle": "⚙️ مساعدة الإعدادات",
|
||||
"helpAvailable": "**الإعدادات المتاحة:** {{settings}}",
|
||||
"helpSubcommands": "**الأوامر الفرعية:**\n• `{{prefix}}settings get` — عرض جميع القيم الحالية\n• `{{prefix}}settings get <إعداد>` — عرض إعداد واحد\n• `{{prefix}}settings set <إعداد> <قيمة>` — تغيير إعداد\n• `{{prefix}}settings reset <إعداد>` — استعادة القيمة الافتراضية\n• `{{prefix}}settings help <إعداد>` — وصف إعداد",
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
"invalidLocale": "❌ `{{locale}}` زمانێکی پشتگیرینەکراو نییە.\nزمانە بەردەستەکان: {{locales}}",
|
||||
"prefixLength": "❌ پێشگر دەبێت لەنێوان **1** و **5** پیت بێت.",
|
||||
"prefixSpaces": "❌ پێشگر ناتوانێت بۆشایی هەبێت.",
|
||||
"invalid247": "❌ بەهای نادروست `{{value}}` بۆ دۆخی 24/7.\n\n**هەڵبژاردنە دروستەکان:**\n• `off` — بۆت لە دوای بێچالاکبوون دەردەچێت\n• `on` — بۆت لە لیستی کەناڵە پاشەکەوتکراوەکاندا چالاک دەمێنێتەوە\n• `auto` — بۆت چالاک دەمێنێتەوە و لیستی کەناڵەکان ئامادە دەنێت بۆ گەڕانەوە",
|
||||
"invalid247": "❌ Invalid value `{{value}}` for 24/7 mode.\n\n**Valid options:**\n• `on` — Bot stays connected permanently. Won't rejoin after `%leave`.\n• `auto` — Bot stays connected and auto-rejoins after `%leave` or disconnect.\n• `off` — Bot leaves after inactivity.\n\n💡 Each channel has its own mode. Use `%247` to see all saved channels.",
|
||||
"noServer": "❌ ناتوانرێت سێرڤەرەکەت پشتڕاست بکرێتەوە.",
|
||||
"noVoice247": "❌ تۆ لە کەناڵێکی دەنگیدا نیت. سەرەتا بەشداری یەکێک بکە، پاشان `%247 {{mode}}` بەکاربهێنە.",
|
||||
"247Disabled": "✅ دۆخی 24/7 **ناچالاک کرا** بۆ <#{{channel}}>. بۆت دەرچوو.",
|
||||
@@ -427,7 +427,7 @@
|
||||
"247Set": "✅ دۆخی 24/7 دانرا بۆ **{{mode}}** بۆ <#{{channel}}>.\n{{summary}}",
|
||||
"247Joined": "✅ دۆخی 24/7 دانرا بۆ **{{mode}}** بۆ <#{{channel}}>. بۆت بەشداری کرد!\n{{summary}}",
|
||||
"247JoinFailed": "✅ دۆخی 24/7 پاشەکەوت کرا بۆ <#{{channel}}>، بەڵام بەشداریکردن سەرکەوتوو نەبوو: {{error}}\n{{summary}}",
|
||||
"247Status": "دۆخی 24/7: {{status}}",
|
||||
"247Status": "♾️ **24/7 Mode**: {{status}}\n\nUse `%247 on` or `%247 auto` to enable — `%247 off` to disable.",
|
||||
"helpTitle": "⚙️ یارمەتی ڕێکخستنەکان",
|
||||
"helpAvailable": "**ڕێکخستنە بەردەستەکان:** {{settings}}",
|
||||
"helpSubcommands": "**فەرمانە لاوەکییەکان:**\n• `{{prefix}}settings get` — لیستی هەموو بەهای ئێستا\n• `{{prefix}}settings get <ڕێکخستن>` — بینینی ڕێکخستنێک\n• `{{prefix}}settings set <ڕێکخستن> <بەها>` — گۆڕینی ڕێکخستن\n• `{{prefix}}settings reset <ڕێکخستن>` — گەڕاندنەوەی بەهای بنەڕەتی\n• `{{prefix}}settings help <ڕێکخستن>` — ڕوونکردنەوەی ڕێکخستن",
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
"noVoiceChannel": "❌ Du bist in keinem Sprachkanal. Bitte trete zuerst einem bei oder gib einen Kanal an: `{{prefix}}join <#Kanal>`",
|
||||
"voiceChannelNotFound": "❌ Konnte diesen Sprachkanal nicht finden. Versuche eine Erwähnung wie `<#Kanal-ID>` oder den genauen Kanalnamen.",
|
||||
"autoLeaveInactive": "Kanal <#{{channel}}> wegen Inaktivität verlassen.",
|
||||
"autoLeaveInactive247": "Kanal <#{{channel}}> wegen Inaktivität verlassen.\nWenn ich im Sprachkanal bleiben soll, nutze `{{prefix}}247 on/auto`",
|
||||
"autoLeaveInactive247": "Kanal <#{{channel}}> wegen Inaktivität verlassen.\nWenn ich im Sprachkanal bleiben soll, nutze `{{prefix}}247 on` oder `{{prefix}}247 auto`\n💡 Nutze `{{prefix}}247` um alle gespeicherten Kanäle zu sehen und zu verwalten.",
|
||||
"joinFailedPerms": "❌ Ich habe keine Berechtigung, <#{{channel}}> beizutreten. Bitte prüfe, ob ich die **Verbinden**-Berechtigung habe.",
|
||||
"voiceChannelUnknown": "unbekannter Sprachkanal"
|
||||
},
|
||||
@@ -247,7 +247,7 @@
|
||||
"multipleChannels": "⚠️ Ich spiele in mehreren Kanälen! Bitte trete einem bei:\n{{channels}}",
|
||||
"playerNotInit": "Player nicht initialisiert.",
|
||||
"leftRejoin247": "✅ Erfolgreich verlassen — trete <#{{channel}}> in 5 Sekunden wieder bei.\nUm den 24/7-Modus dauerhaft zu deaktivieren, nutze `%247 off`.",
|
||||
"left247On": "✅ Erfolgreich verlassen.\nℹ️ 24/7-Modus ist **aktiv** — Bot wird nicht automatisch wiederkommen. Nutze `%play`, um ihn zurückzuholen, oder `%247 off` zum vollständigen Deaktivieren."
|
||||
"left247On": "✅ Erfolgreich verlassen.\nℹ️ 24/7-Modus ist **aktiv** — Bot wird nicht automatisch wiederkommen. Nutze `%play`, um ihn zurückzuholen, oder `%247 off` zum vollständigen Deaktivieren.\n💡 Nutze `%247` um alle gespeicherten Kanäle zu sehen."
|
||||
},
|
||||
"list": {
|
||||
"empty": "📭 Die Warteschlange ist leer. Nutze `{{prefix}}play`, um Songs hinzuzufügen!",
|
||||
@@ -419,15 +419,15 @@
|
||||
"invalidLocale": "❌ `{{locale}}` wird nicht unterstützt.\nVerfügbare Locales: {{locales}}",
|
||||
"prefixLength": "❌ Das Präfix muss zwischen **1** und **5** Zeichen lang sein.",
|
||||
"prefixSpaces": "❌ Das Präfix darf keine Leerzeichen enthalten.",
|
||||
"invalid247": "❌ Ungültiger Wert `{{value}}` für den 24/7-Modus.\n\n**Gültige Optionen:**\n• `off` — Bot verlässt nach Inaktivität\n• `on` — Bot bleibt in der gespeicherten Kanalliste aktiv\n• `auto` — Bot bleibt aktiv und hält die Kanalliste zur Wiederherstellung bereit",
|
||||
"invalid247": "❌ Ungültiger Wert `{{value}}` für den 24/7-Modus.\n\n**Gültige Optionen:**\n• `on` — Bot bleibt permanent verbunden. Kein automatischer Wiederbeitritt nach `%leave`.\n• `auto` — Bot bleibt verbunden und tritt nach `%leave` oder Trennung automatisch bei.\n• `off` — Bot verlässt nach Inaktivität.\n\n💡 Jeder Kanal hat seinen eigenen Modus. Nutze `%247` um alle gespeicherten Kanäle zu sehen.",
|
||||
"noServer": "❌ Konnte deinen Server nicht ermitteln.",
|
||||
"noVoice247": "❌ Du bist in keinem Sprachkanal. Tritt einem bei und führe dann `%247 {{mode}}` erneut aus.",
|
||||
"247Disabled": "✅ 24/7-Modus **deaktiviert** für <#{{channel}}>. Bot hat den Kanal verlassen.",
|
||||
"247DisabledAll": "✅ 24/7-Modus **deaktiviert** für alle Kanäle in diesem Server.",
|
||||
"247Set": "✅ 24/7-Modus auf **{{mode}}** gesetzt für <#{{channel}}>.\n{{summary}}",
|
||||
"247Joined": "✅ 24/7-Modus auf **{{mode}}** gesetzt für <#{{channel}}>. Bot beigetreten!\n{{summary}}",
|
||||
"247JoinFailed": "✅ 24/7-Modus gespeichert für <#{{channel}}>, aber Beitritt fehlgeschlagen: {{error}}\n{{summary}}",
|
||||
"247Status": "24/7-Modus: {{status}}",
|
||||
"noVoice247": "❌ Du bist in keinem Sprachkanal. Tritt einem bei und führe dann `%247 {{mode}}` erneut aus.\n\n💡 Jeder Kanal hat seinen eigenen 24/7-Modus.",
|
||||
"247Disabled": "✅ 24/7-Modus **deaktiviert** für <#{{channel}}>. Bot hat den Kanal verlassen.\n💡 Nutze `%247` um verbleibende gespeicherte Kanäle zu sehen.",
|
||||
"247DisabledAll": "✅ 24/7-Modus **deaktiviert** für alle Kanäle in diesem Server.\nBot verlässt nach Inaktivität.",
|
||||
"247Set": "✅ 24/7-Modus auf **{{mode}}** gesetzt für <#{{channel}}>.\n{{summary}}\n\n💡 Nutze `%247` um alle gespeicherten Kanäle zu sehen.",
|
||||
"247Joined": "✅ 24/7-Modus auf **{{mode}}** gesetzt für <#{{channel}}>. Bot beigetreten!\n{{summary}}\n\n💡 Nutze `%247` um alle gespeicherten Kanäle zu sehen.",
|
||||
"247JoinFailed": "⚠️ 24/7-Modus gespeichert für <#{{channel}}>, aber Beitritt fehlgeschlagen: {{error}}\n{{summary}}\n\nVersuche `%join` oder `%play` später, oder `%247 off` zum Entfernen.",
|
||||
"247Status": "♾️ **24/7-Modus**: {{status}}\n\nNutze `%247 on` oder `%247 auto` zum Aktivieren — `%247 off` zum Deaktivieren.",
|
||||
"helpTitle": "⚙️ Einstellungen-Hilfe",
|
||||
"helpAvailable": "**Verfügbare Einstellungen:** {{settings}}",
|
||||
"helpSubcommands": "**Unterbefehle:**\n• `{{prefix}}settings get` — alle aktuellen Werte anzeigen\n• `{{prefix}}settings get <Einstellung>` — einzelne Einstellung anzeigen\n• `{{prefix}}settings set <Einstellung> <Wert>` — Einstellung ändern\n• `{{prefix}}settings reset <Einstellung>` — Standardwert wiederherstellen\n• `{{prefix}}settings help <Einstellung>` — Einstellung beschreiben",
|
||||
|
||||
+10
-10
@@ -236,7 +236,7 @@
|
||||
"noVoiceChannel": "❌ You're not in a voice channel. Please join one first, or specify a channel: `{{prefix}}join <#channel>`",
|
||||
"voiceChannelNotFound": "❌ Couldn't find that voice channel. Try using a mention like `<#channelid>` or the exact channel name.",
|
||||
"autoLeaveInactive": "Left channel <#{{channel}}> because of inactivity.",
|
||||
"autoLeaveInactive247": "Left channel <#{{channel}}> because of inactivity.\nIf you want me to stay in voice, use `{{prefix}}247 on/auto`",
|
||||
"autoLeaveInactive247": "Left channel <#{{channel}}> because of inactivity.\nIf you want me to stay in voice, use `{{prefix}}247 on` or `{{prefix}}247 auto`\nUse `{{prefix}}247` to view and manage all saved channels.",
|
||||
"joinFailedPerms": "❌ I don't have permission to join <#{{channel}}>. Please check that I have the **Connect** permission.",
|
||||
"voiceChannelUnknown": "unknown voice channel"
|
||||
},
|
||||
@@ -247,7 +247,7 @@
|
||||
"multipleChannels": "⚠️ I'm playing in multiple channels! Please join one of them:\n{{channels}}",
|
||||
"playerNotInit": "Player not initialized.",
|
||||
"leftRejoin247": "✅ Successfully Left — rejoining <#{{channel}}> in 5 seconds.\nTo disable 24/7 mode permanently, use `%247 off`.",
|
||||
"left247On": "✅ Successfully Left.\nℹ️ 24/7 mode is **on** — bot won't rejoin automatically. Use `%play` to bring it back, or `%247 off` to fully disable."
|
||||
"left247On": "✅ Successfully Left.\n24/7 mode is **on** — bot won't rejoin automatically. Use `%play` to bring it back, or `%247 off` to fully disable.\nUse `%247` to view all saved channels."
|
||||
},
|
||||
"list": {
|
||||
"empty": "📭 The queue is empty. Use `{{prefix}}play` to add songs!",
|
||||
@@ -419,15 +419,15 @@
|
||||
"invalidLocale": "❌ `{{locale}}` is not a supported locale.\nAvailable locales: {{locales}}",
|
||||
"prefixLength": "❌ Prefix must be between **1** and **5** characters.",
|
||||
"prefixSpaces": "❌ Prefix cannot contain spaces.",
|
||||
"invalid247": "❌ Invalid value `{{value}}` for 24/7 mode.\n\n**Valid options:**\n• `off` — bot leaves after inactivity\n• `on` — bot stays active in the saved channel list\n• `auto` — bot stays active and keeps the saved channel list ready for recovery",
|
||||
"invalid247": "❌ Invalid value `{{value}}` for 24/7 mode.\n\n**Valid options:**\n• `on` — Stay connected permanently, no auto-rejoin after `%leave`\n• `auto` — Stay connected & auto-rejoin after `%leave` or disconnect\n• `off` — Leave after inactivity\n\nEach channel has its own mode. Use `%247` to see all saved channels.",
|
||||
"noServer": "❌ Could not detect your server.",
|
||||
"noVoice247": "❌ You're not in a voice channel. Join one first, then run `%247 {{mode}}` again.",
|
||||
"247Disabled": "✅ 24/7 mode **disabled** for <#{{channel}}>. Bot has left.",
|
||||
"247DisabledAll": "✅ 24/7 mode **disabled** for all channels in this server.",
|
||||
"247Set": "✅ 24/7 mode set to **{{mode}}** for <#{{channel}}>.\n{{summary}}",
|
||||
"247Joined": "✅ 24/7 mode set to **{{mode}}** for <#{{channel}}>. Bot joined!\n{{summary}}",
|
||||
"247JoinFailed": "✅ 24/7 mode saved for <#{{channel}}>, but failed to join: {{error}}\n{{summary}}",
|
||||
"247Status": "24/7 mode: {{status}}",
|
||||
"noVoice247": "❌ You're not in a voice channel. Join one first, then run `%247 {{mode}}` again.\n\n💡 Each channel gets its own 24/7 mode setting.",
|
||||
"247Disabled": "✅ 24/7 mode **disabled** for <#{{channel}}>. Bot has left.\n💡 Use `%247` to see remaining saved channels.",
|
||||
"247DisabledAll": "✅ 24/7 mode **disabled** for all channels in this server.\nBot will leave voice after inactivity.",
|
||||
"247Set": "✅ 24/7 mode set to **{{mode}}** for <#{{channel}}>.\n{{summary}}\n\n💡 Use `%247` to view all saved channels.",
|
||||
"247Joined": "✅ 24/7 mode set to **{{mode}}** for <#{{channel}}>. Bot joined!\n{{summary}}\n\n💡 Use `%247` to view all saved channels.",
|
||||
"247JoinFailed": "⚠️ 24/7 mode saved for <#{{channel}}>, but failed to join: {{error}}\n{{summary}}\n\nTry `%join` or `%play` later, or `%247 off` to remove.",
|
||||
"247Status": "♾️ **24/7 Mode**: {{status}}\n\nUse `%247 on` or `%247 auto` to enable — `%247 off` to disable.",
|
||||
"helpTitle": "⚙️ Settings Help",
|
||||
"helpAvailable": "**Available settings:** {{settings}}",
|
||||
"helpSubcommands": "**Subcommands:**\n• `{{prefix}}settings get` — list all current values\n• `{{prefix}}settings get <setting>` — view a single setting\n• `{{prefix}}settings set <setting> <value>` — change a setting\n• `{{prefix}}settings reset <setting>` — restore default value\n• `{{prefix}}settings help <setting>` — describe a setting",
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
"invalidLocale": "❌ `{{locale}}` não é um idioma suportado.\nIdiomas disponíveis: {{locales}}",
|
||||
"prefixLength": "❌ O prefixo deve ter entre **1** e **5** caracteres.",
|
||||
"prefixSpaces": "❌ O prefixo não pode conter espaços.",
|
||||
"invalid247": "❌ Valor inválido `{{value}}` para o modo 24/7.\n\n**Opções válidas:**\n• `off` — bot sai após inatividade\n• `on` — bot permanece ativo na lista de canais salva\n• `auto` — bot permanece ativo e mantém a lista de canais pronta para recuperação",
|
||||
"invalid247": "❌ Invalid value `{{value}}` for 24/7 mode.\n\n**Valid options:**\n• `on` — Bot stays connected permanently. Won't rejoin after `%leave`.\n• `auto` — Bot stays connected and auto-rejoins after `%leave` or disconnect.\n• `off` — Bot leaves after inactivity.\n\n💡 Each channel has its own mode. Use `%247` to see all saved channels.",
|
||||
"noServer": "❌ Não foi possível detectar seu servidor.",
|
||||
"noVoice247": "❌ Você não está em um canal de voz. Entre em um primeiro e depois execute `%247 {{mode}}` novamente.",
|
||||
"247Disabled": "✅ Modo 24/7 **desativado** para <#{{channel}}>. Bot saiu.",
|
||||
@@ -427,7 +427,7 @@
|
||||
"247Set": "✅ Modo 24/7 definido como **{{mode}}** para <#{{channel}}>.\n{{summary}}",
|
||||
"247Joined": "✅ Modo 24/7 definido como **{{mode}}** para <#{{channel}}>. Bot entrou!\n{{summary}}",
|
||||
"247JoinFailed": "✅ Modo 24/7 salvo para <#{{channel}}>, mas falha ao entrar: {{error}}\n{{summary}}",
|
||||
"247Status": "Modo 24/7: {{status}}",
|
||||
"247Status": "♾️ **24/7 Mode**: {{status}}\n\nUse `%247 on` or `%247 auto` to enable — `%247 off` to disable.",
|
||||
"helpTitle": "⚙️ Ajuda de Configurações",
|
||||
"helpAvailable": "**Configurações disponíveis:** {{settings}}",
|
||||
"helpSubcommands": "**Subcomandos:**\n• `{{prefix}}settings get` — listar todos os valores atuais\n• `{{prefix}}settings get <config>` — ver uma configuração específica\n• `{{prefix}}settings set <config> <valor>` — alterar uma configuração\n• `{{prefix}}settings reset <config>` — restaurar valor padrão\n• `{{prefix}}settings help <config>` — descrever uma configuração",
|
||||
|
||||
Reference in new issue
Block a user