mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat(leave): add optional channel argument to /leave command
- %leave now accepts an optional `channel` option; defaults to the user's current voice channel when omitted - Updated locale strings to describe the new behaviour and provide clearer error messages (noVoiceChannel, specifyChannel, noPlayerInChannel) fix(PlayerManager): improve voice-state resolution after reboot - Added VoiceManager.voiceStates as a fallback lookup when getVoiceChannelId() returns null on startup - Multi-player guilds now check LiveKit remote participants to determine which channel a user is actually in - Filter out destroyed players when resolving guild player list fix(PlayerManager): deduplicate Last.fm scrobble timers - Added _pendingScrobbleTimers map to prevent duplicate scrobbles when startplay fires multiple times for the same channel - Timers are now properly cleared on song skip and player stop fix(RecoveryManager): restore textChannel after reboot for 24/7 mode - Spawned players after reboot now resolve an announcement channel from server settings or the first available text channel, so song announcements aren't silently dropped fix(Player): remove unused worker semaphore and dead media-player code - Removed _workerSemaphore / _workerQueue / _workerPool semaphore logic - Removed no-op _setupMediaPlayerMonitoring and _cleanupMediaPlayer methods - Removed unused spotifyConfig field fix(CommandHandler): skip Flag instances during option processing
This commit is contained in:
1 parent
7a4009f5c3
commit
9cfa8e2e6c
10 files changed
+188
-100
No files matched your search
+72
-31
@@ -6,15 +6,24 @@ import { get247ChannelMode } from "../src/constants/Helpers247.mjs";
|
|||||||
|
|
||||||
export const command = new CommandBuilder()
|
export const command = new CommandBuilder()
|
||||||
.setName("leave")
|
.setName("leave")
|
||||||
.setDescription("Make the bot leave your current voice channel", "commands.leave")
|
.setDescription("Make the bot leave a voice channel", "commands.leave")
|
||||||
.addAliases("l", "stop")
|
.addAliases("l", "stop")
|
||||||
.setCategory("music");
|
.setCategory("music")
|
||||||
|
.addChannelOption(o =>
|
||||||
|
o.setName("channel")
|
||||||
|
.setDescription("The voice channel to leave (defaults to your current channel)")
|
||||||
|
.setRequired(false)
|
||||||
|
);
|
||||||
|
|
||||||
function embed(desc) {
|
function embed(desc) {
|
||||||
return { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc)] };
|
return { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc)] };
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function run(msg) {
|
function cleanId(value) {
|
||||||
|
return String(value ?? "").replace(/\D/g, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function run(msg, data) {
|
||||||
const guildId = msg.channel?.guild?.id
|
const guildId = msg.channel?.guild?.id
|
||||||
?? msg.channel?.guildId
|
?? msg.channel?.guildId
|
||||||
?? msg.channel?.server_id
|
?? msg.channel?.server_id
|
||||||
@@ -22,47 +31,79 @@ export async function run(msg) {
|
|||||||
?? msg.message?.guildId
|
?? msg.message?.guildId
|
||||||
?? msg.message?.server_id
|
?? msg.message?.server_id
|
||||||
?? msg.message?.serverId;
|
?? msg.message?.serverId;
|
||||||
|
const cleanGuildId = cleanId(guildId);
|
||||||
|
|
||||||
const userChannelId = this.players.checkVoiceChannels(msg);
|
// Gather all active players in this guild
|
||||||
if (!userChannelId) return msg.reply(embed(this.t(msg, "responses.leave.noVoiceChannel")));
|
const guildPlayers = [...this.players.playerMap.entries()].filter(([, p]) =>
|
||||||
|
cleanId(p?._guildId) === cleanGuildId && !p?._destroyed
|
||||||
const cid = String(userChannelId).replace(/\D/g, "");
|
|
||||||
const cleanGuildId = String(guildId ?? "").replace(/\D/g, "");
|
|
||||||
const guildPlayers = [...this.players.playerMap.values()].filter(p =>
|
|
||||||
String(p?._guildId ?? "").replace(/\D/g, "") === cleanGuildId &&
|
|
||||||
!p?._destroyed
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const player = this.players.playerMap.get(cid)
|
// Resolve the target channel to leave:
|
||||||
?? [...this.players.playerMap.values()].find(p =>
|
// 1. If a channel option was provided, use that
|
||||||
String(p?._channelId ?? "").replace(/\D/g, "") === cid
|
// 2. Otherwise, use the user's current voice channel
|
||||||
)
|
const specifiedChannel = data?.get("channel")?.value;
|
||||||
?? (guildPlayers.length === 1 ? guildPlayers[0] : null);
|
let targetChannelId = null;
|
||||||
|
|
||||||
|
if (specifiedChannel) {
|
||||||
|
targetChannelId = cleanId(specifiedChannel);
|
||||||
|
} else {
|
||||||
|
const userChannelId = this.players.checkVoiceChannels(msg);
|
||||||
|
if (userChannelId) targetChannelId = cleanId(userChannelId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we still don't have a target channel
|
||||||
|
if (!targetChannelId) {
|
||||||
|
if (guildPlayers.length === 0) {
|
||||||
|
return msg.reply(embed(this.t(msg, "responses.leave.notInVoice")));
|
||||||
|
}
|
||||||
|
// User not in voice — list the channels the bot is in
|
||||||
|
const channelList = guildPlayers.map(([, p]) => {
|
||||||
|
const id = cleanId(p._channelId);
|
||||||
|
return id ? `<#${id}>` : "`unknown`";
|
||||||
|
});
|
||||||
|
return msg.reply(embed(
|
||||||
|
this.t(msg, "responses.leave.specifyChannel", {
|
||||||
|
channels: channelList.map(c => `• ${c}`).join("\n"),
|
||||||
|
prefix: this.getSettings(msg)?.get("prefix") ?? "%"
|
||||||
|
})
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the player for the target channel
|
||||||
|
const player = this.players.playerMap.get(targetChannelId)
|
||||||
|
?? guildPlayers.find(([, p]) => cleanId(p._channelId) === targetChannelId)?.[1]
|
||||||
|
?? null;
|
||||||
|
|
||||||
if (!player) {
|
if (!player) {
|
||||||
const guildChannels = guildPlayers.map((p) => {
|
// No player in that channel — check if user picked a non-voice channel
|
||||||
const liveId = String(p?._channelId ?? "").replace(/\D/g, "");
|
if (guildPlayers.length === 0) {
|
||||||
return liveId ? `<#${liveId}>` : "`unknown voice channel`";
|
return msg.reply(embed(this.t(msg, "responses.leave.notInVoice")));
|
||||||
|
}
|
||||||
|
const channelList = guildPlayers.map(([, p]) => {
|
||||||
|
const id = cleanId(p._channelId);
|
||||||
|
return id ? `<#${id}>` : "`unknown`";
|
||||||
});
|
});
|
||||||
|
|
||||||
if (guildChannels.length === 0) return msg.reply(embed(this.t(msg, "responses.leave.notInVoice")));
|
|
||||||
if (guildChannels.length === 1) return msg.reply(embed(this.t(msg, "responses.leave.joinChannel", { channel: guildChannels[0] })));
|
|
||||||
return msg.reply(embed(
|
return msg.reply(embed(
|
||||||
this.t(msg, "responses.leave.multipleChannels", { channels: guildChannels.map(c => `• ${c}`).join("\n") })
|
this.t(msg, "responses.leave.noPlayerInChannel", {
|
||||||
|
channel: `<#${targetChannelId}>`,
|
||||||
|
channels: channelList.map(c => `• ${c}`).join("\n")
|
||||||
|
})
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player?.connection) return msg.reply(embed(this.t(msg, "responses.leave.playerNotInit")));
|
if (!player?.connection) return msg.reply(embed(this.t(msg, "responses.leave.playerNotInit")));
|
||||||
const activeChannelId = String(player._channelId ?? cid).replace(/\D/g, "") || cid;
|
|
||||||
const homeChannelId = String(player._home247Channel ?? activeChannelId).replace(/\D/g, "") || activeChannelId;
|
|
||||||
|
|
||||||
const set = this.getSettings(msg);
|
const activeChannelId = cleanId(player._channelId) || targetChannelId;
|
||||||
const raw = set?.get("stay_247");
|
const homeChannelId = cleanId(player._home247Channel) || activeChannelId;
|
||||||
|
|
||||||
|
// ── 24/7 handling ────────────────────────────────────────────────────────
|
||||||
|
const set = this.getSettings(msg);
|
||||||
|
const raw = set?.get("stay_247");
|
||||||
const ch247 = (!raw || raw === "none")
|
const ch247 = (!raw || raw === "none")
|
||||||
? new Set()
|
? new Set()
|
||||||
: Array.isArray(raw)
|
: Array.isArray(raw)
|
||||||
? new Set(raw.map(id => String(id).replace(/\D/g, "")).filter(Boolean))
|
? new Set(raw.map(id => cleanId(id)).filter(Boolean))
|
||||||
: new Set([String(raw).replace(/\D/g, "")]);
|
: new Set([cleanId(raw)]);
|
||||||
|
|
||||||
if (ch247.has(activeChannelId) || ch247.has(homeChannelId)) {
|
if (ch247.has(activeChannelId) || ch247.has(homeChannelId)) {
|
||||||
const matchChannel = ch247.has(homeChannelId) ? homeChannelId
|
const matchChannel = ch247.has(homeChannelId) ? homeChannelId
|
||||||
@@ -71,13 +112,13 @@ export async function run(msg) {
|
|||||||
const mode = matchChannel ? get247ChannelMode(set, matchChannel) : "off";
|
const mode = matchChannel ? get247ChannelMode(set, matchChannel) : "off";
|
||||||
this.markIntentionalLeave(activeChannelId);
|
this.markIntentionalLeave(activeChannelId);
|
||||||
this.players.playerMap.delete(activeChannelId);
|
this.players.playerMap.delete(activeChannelId);
|
||||||
if (activeChannelId !== cid) this.players.playerMap.delete(cid);
|
if (activeChannelId !== targetChannelId) this.players.playerMap.delete(targetChannelId);
|
||||||
if (homeChannelId !== activeChannelId) this.players.playerMap.delete(homeChannelId);
|
if (homeChannelId !== activeChannelId) this.players.playerMap.delete(homeChannelId);
|
||||||
await player.leave().catch(() => {});
|
await player.leave().catch(() => {});
|
||||||
player.destroy();
|
player.destroy();
|
||||||
|
|
||||||
if (mode === "auto") {
|
if (mode === "auto") {
|
||||||
msg.reply(embed(this.t(msg, "responses.leave.leftRejoin247", { channel: cid })));
|
msg.reply(embed(this.t(msg, "responses.leave.leftRejoin247", { channel: targetChannelId })));
|
||||||
const leave247Delay = this.config?.timers?.leave247RejoinDelay ?? 5000;
|
const leave247Delay = this.config?.timers?.leave247RejoinDelay ?? 5000;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this._spawnPlayer) {
|
if (this._spawnPlayer) {
|
||||||
|
|||||||
@@ -586,6 +586,7 @@ export class CommandHandler extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!o) continue;
|
if (!o) continue;
|
||||||
|
if (o instanceof Flag) continue;
|
||||||
if (opts.findIndex(op => op.uid === o.uid) !== -1) continue;
|
if (opts.findIndex(op => op.uid === o.uid) !== -1) continue;
|
||||||
let value = args[argIndex];
|
let value = args[argIndex];
|
||||||
if ((args[argIndex] || "").startsWith('"') && (STRING_TYPES.includes(o.type))) {
|
if ((args[argIndex] || "").startsWith('"') && (STRING_TYPES.includes(o.type))) {
|
||||||
|
|||||||
+2
-57
@@ -243,8 +243,6 @@ export class Queue extends EventEmitter {
|
|||||||
return `Moved **${track.title}** from position ${from + 1} to ${to + 1}.`;
|
return `Moved **${track.title}** from position ${from + 1} to ${to + 1}.`;
|
||||||
}
|
}
|
||||||
|
|
||||||
addFirst(data) { return this.add(data, true); }
|
|
||||||
|
|
||||||
add(data, top = false) {
|
add(data, top = false) {
|
||||||
this.emit("queue", { type: "add", data: { append: !top, data } });
|
this.emit("queue", { type: "add", data: { append: !top, data } });
|
||||||
return top ? this.data.unshift(data) : this.data.push(data);
|
return top ? this.data.unshift(data) : this.data.push(data);
|
||||||
@@ -311,8 +309,6 @@ export default class Player extends EventEmitter {
|
|||||||
client = null;
|
client = null;
|
||||||
settings = null;
|
settings = null;
|
||||||
config = {};
|
config = {};
|
||||||
spotifyConfig = null;
|
|
||||||
|
|
||||||
// revoice.js instances
|
// revoice.js instances
|
||||||
/** @type {import("revoice.js").MediaPlayer|null} */
|
/** @type {import("revoice.js").MediaPlayer|null} */
|
||||||
_mediaPlayer = null;
|
_mediaPlayer = null;
|
||||||
@@ -377,7 +373,6 @@ export default class Player extends EventEmitter {
|
|||||||
this.queue = new Queue();
|
this.queue = new Queue();
|
||||||
this.client = opts.client;
|
this.client = opts.client;
|
||||||
this.config = opts.config ?? {};
|
this.config = opts.config ?? {};
|
||||||
this.spotifyConfig = opts.config?.spotify;
|
|
||||||
this.settings = opts.settings ?? null;
|
this.settings = opts.settings ?? null;
|
||||||
this.settingsMgr = opts.settingsMgr ?? null;
|
this.settingsMgr = opts.settingsMgr ?? null;
|
||||||
this._observedVoiceUsers = opts.observedVoiceUsers ?? null;
|
this._observedVoiceUsers = opts.observedVoiceUsers ?? null;
|
||||||
@@ -739,17 +734,7 @@ export default class Player extends EventEmitter {
|
|||||||
// @fluxerjs channels do NOT have a .members property.
|
// @fluxerjs channels do NOT have a .members property.
|
||||||
// Use the guild's member manager and filter by voice state instead.
|
// Use the guild's member manager and filter by voice state instead.
|
||||||
const guild = this.client?.guilds?.get?.(this._guildId);
|
const guild = this.client?.guilds?.get?.(this._guildId);
|
||||||
if (guild?.members) {
|
// Iterate raw voice_states on the guild object.
|
||||||
for (const member of guild.members.values()) {
|
|
||||||
// GuildMember doesn't expose voice channelId directly in @fluxerjs,
|
|
||||||
// so fall through to the voice_states raw data check below.
|
|
||||||
if (!member?.user?.bot) {
|
|
||||||
// We can't determine channel from member alone — skip here
|
|
||||||
// and rely on _observedVoiceUsers or voice_states instead.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Fallback: iterate raw voice_states on the guild object.
|
|
||||||
const voiceStates = guild?.voice_states;
|
const voiceStates = guild?.voice_states;
|
||||||
if (voiceStates) {
|
if (voiceStates) {
|
||||||
const entries = Array.isArray(voiceStates)
|
const entries = Array.isArray(voiceStates)
|
||||||
@@ -892,8 +877,6 @@ export default class Player extends EventEmitter {
|
|||||||
try {
|
try {
|
||||||
this._mediaPlayer = new MediaPlayer();
|
this._mediaPlayer = new MediaPlayer();
|
||||||
this._mediaPlayer.setMaxListeners(0);
|
this._mediaPlayer.setMaxListeners(0);
|
||||||
this._setupMediaPlayerMonitoring();
|
|
||||||
|
|
||||||
await this._mediaPlayer.publishToRoom(room);
|
await this._mediaPlayer.publishToRoom(room);
|
||||||
logger.mediaplayer("[Player] MediaPlayer published successfully");
|
logger.mediaplayer("[Player] MediaPlayer published successfully");
|
||||||
return true;
|
return true;
|
||||||
@@ -914,18 +897,6 @@ export default class Player extends EventEmitter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_setupMediaPlayerMonitoring() {
|
|
||||||
// No-op: recovery is fully handled by connection.on("disconnect") in join().
|
|
||||||
}
|
|
||||||
|
|
||||||
async _cleanupMediaPlayer() {
|
|
||||||
try {
|
|
||||||
await this._mediaPlayer?.stop();
|
|
||||||
} catch (_) {}
|
|
||||||
|
|
||||||
this._mediaPlayer = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
async _stopMediaPlayer() {
|
async _stopMediaPlayer() {
|
||||||
this._streamingStopped = true;
|
this._streamingStopped = true;
|
||||||
|
|
||||||
@@ -1624,12 +1595,6 @@ export default class Player extends EventEmitter {
|
|||||||
this._workerPool = null;
|
this._workerPool = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (this._workerQueue.length > 0) {
|
|
||||||
const resolve = this._workerQueue.shift();
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
this._workerSemaphore = 0;
|
|
||||||
|
|
||||||
const connToDestroy = this.connection;
|
const connToDestroy = this.connection;
|
||||||
this.connection = null;
|
this.connection = null;
|
||||||
this._mediaPlayer = null;
|
this._mediaPlayer = null;
|
||||||
@@ -2124,27 +2089,7 @@ export default class Player extends EventEmitter {
|
|||||||
// Worker Management
|
// Worker Management
|
||||||
// ═══════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
_workerSemaphore = 0;
|
_workerPool = null;
|
||||||
_workerMaxConcurrent = 3;
|
|
||||||
_workerQueue = [];
|
|
||||||
_workerPool = null;
|
|
||||||
|
|
||||||
_acquireWorkerSlot() {
|
|
||||||
if (this._workerSemaphore < this._workerMaxConcurrent) {
|
|
||||||
this._workerSemaphore++;
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
return new Promise(resolve => this._workerQueue.push(resolve));
|
|
||||||
}
|
|
||||||
|
|
||||||
_releaseWorkerSlot() {
|
|
||||||
const next = this._workerQueue.shift();
|
|
||||||
if (next) {
|
|
||||||
next();
|
|
||||||
} else {
|
|
||||||
this._workerSemaphore--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_getWorkerPool() {
|
_getWorkerPool() {
|
||||||
if (!this._workerPool) {
|
if (!this._workerPool) {
|
||||||
|
|||||||
+64
-2
@@ -87,6 +87,10 @@ export class PlayerManager {
|
|||||||
/** @type {Set<string>} Channel IDs currently being joined (not yet in playerMap) */
|
/** @type {Set<string>} Channel IDs currently being joined (not yet in playerMap) */
|
||||||
_pendingJoins = new Set();
|
_pendingJoins = new Set();
|
||||||
|
|
||||||
|
/** @type {Map<string, {timer, songUrl, startedAtMs}>} Pending scrobble timers keyed by channel ID.
|
||||||
|
* Prevents duplicate scrobbles when startplay fires multiple times. */
|
||||||
|
_pendingScrobbleTimers = new Map();
|
||||||
|
|
||||||
/** @type {Object} */
|
/** @type {Object} */
|
||||||
config;
|
config;
|
||||||
|
|
||||||
@@ -387,6 +391,22 @@ export class PlayerManager {
|
|||||||
if (seeded) return seeded;
|
if (seeded) return seeded;
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
|
// ── Fallback: VoiceManager.voiceStates direct lookup ────────────────
|
||||||
|
// After a reboot, getVoiceChannelId() may return null if the
|
||||||
|
// VoiceManager hasn't synced yet, but voiceStates (populated from
|
||||||
|
// READY / GUILD_CREATE raw gateway events) may already have the data.
|
||||||
|
try {
|
||||||
|
const vm = getVoiceManager(this.commands.client);
|
||||||
|
if (vm?.voiceStates) {
|
||||||
|
const guildVoiceMap = vm.voiceStates.get(cleanGuild) ?? vm.voiceStates.get(guildId);
|
||||||
|
if (guildVoiceMap && typeof guildVoiceMap.get === "function") {
|
||||||
|
const vmChannelId = guildVoiceMap.get(userId);
|
||||||
|
const seeded = seedObserved(vmChannelId);
|
||||||
|
if (seeded) return seeded;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
const memberVoiceChannelId =
|
const memberVoiceChannelId =
|
||||||
message?.member?.voice?.channelId ??
|
message?.member?.voice?.channelId ??
|
||||||
message?.message?.member?.voice?.channelId ??
|
message?.message?.member?.voice?.channelId ??
|
||||||
@@ -428,15 +448,37 @@ export class PlayerManager {
|
|||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
|
// ── Fallback: match user to any active player in the guild ──────────
|
||||||
|
// After a reboot with 24/7, voice states may not be fully populated.
|
||||||
|
// If the guild has active players, check if any of them have the user
|
||||||
|
// as a remote participant in their LiveKit room.
|
||||||
const liveGuildPlayers = [...this.playerMap.entries()].filter(([channelId, player]) => {
|
const liveGuildPlayers = [...this.playerMap.entries()].filter(([channelId, player]) => {
|
||||||
const fallbackChannel =
|
const fallbackChannel =
|
||||||
this.commands.client?.channels?.get?.(channelId) ??
|
this.commands.client?.channels?.get?.(channelId) ??
|
||||||
null;
|
null;
|
||||||
return getPlayerGuildId(player, fallbackChannel) === cleanGuild;
|
return getPlayerGuildId(player, fallbackChannel) === cleanGuild && !player?._destroyed;
|
||||||
});
|
});
|
||||||
if (liveGuildPlayers.length === 1) {
|
if (liveGuildPlayers.length === 1) {
|
||||||
return getPlayerChannelId(liveGuildPlayers[0][1], liveGuildPlayers[0][0]) || cleanId(liveGuildPlayers[0][0]);
|
return getPlayerChannelId(liveGuildPlayers[0][1], liveGuildPlayers[0][0]) || cleanId(liveGuildPlayers[0][0]);
|
||||||
}
|
}
|
||||||
|
// Multiple players — try LiveKit remote participants to find which
|
||||||
|
// channel the user is actually in.
|
||||||
|
if (liveGuildPlayers.length > 1) {
|
||||||
|
for (const [mapKey, player] of liveGuildPlayers) {
|
||||||
|
try {
|
||||||
|
const room = player?.connection?.room;
|
||||||
|
if (!room?.isConnected || !room.remoteParticipants) continue;
|
||||||
|
for (const [, participant] of room.remoteParticipants) {
|
||||||
|
const pId = participant?.identity ?? participant?.sid;
|
||||||
|
if (pId === userId) {
|
||||||
|
const found = getPlayerChannelId(player, mapKey) || cleanId(mapKey);
|
||||||
|
seedObserved(found);
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -658,6 +700,9 @@ export class PlayerManager {
|
|||||||
|
|
||||||
const activeChannelId = getPlayerChannelId(player, cleanChannelId) || cleanChannelId;
|
const activeChannelId = getPlayerChannelId(player, cleanChannelId) || cleanChannelId;
|
||||||
this.playerMap.delete(activeChannelId);
|
this.playerMap.delete(activeChannelId);
|
||||||
|
// Clean up pending scrobble timer
|
||||||
|
const pendingScrobble = this._pendingScrobbleTimers.get(activeChannelId);
|
||||||
|
if (pendingScrobble) { clearTimeout(pendingScrobble.timer); this._pendingScrobbleTimers.delete(activeChannelId); }
|
||||||
if (activeChannelId !== cleanChannelId) this.playerMap.delete(cleanChannelId);
|
if (activeChannelId !== cleanChannelId) this.playerMap.delete(cleanChannelId);
|
||||||
await msg.reply(mkEmbed(this._t(msg, "responses._common.successfullyLeft")));
|
await msg.reply(mkEmbed(this._t(msg, "responses._common.successfullyLeft")));
|
||||||
await player.leave();
|
await player.leave();
|
||||||
@@ -750,6 +795,9 @@ export class PlayerManager {
|
|||||||
|
|
||||||
// Remove player from map and destroy
|
// Remove player from map and destroy
|
||||||
this.playerMap.delete(activeChannelId);
|
this.playerMap.delete(activeChannelId);
|
||||||
|
// Clean up pending scrobble timer
|
||||||
|
const pendingScrobble = this._pendingScrobbleTimers.get(activeChannelId);
|
||||||
|
if (pendingScrobble) { clearTimeout(pendingScrobble.timer); this._pendingScrobbleTimers.delete(activeChannelId); }
|
||||||
if (activeChannelId !== cleanChannelId) this.playerMap.delete(cleanChannelId);
|
if (activeChannelId !== cleanChannelId) this.playerMap.delete(cleanChannelId);
|
||||||
if (homeChannelId !== activeChannelId) this.playerMap.delete(homeChannelId);
|
if (homeChannelId !== activeChannelId) this.playerMap.delete(homeChannelId);
|
||||||
player.destroy();
|
player.destroy();
|
||||||
@@ -893,6 +941,16 @@ export class PlayerManager {
|
|||||||
|
|
||||||
const startedAtMs = player.startedPlaying;
|
const startedAtMs = player.startedPlaying;
|
||||||
|
|
||||||
|
// ── Cancel any previous pending scrobble timer for this channel ───────
|
||||||
|
// Prevents duplicate scrobbles when startplay fires multiple times
|
||||||
|
// (e.g. recovery rejoining, track restart, queue loop).
|
||||||
|
const pendingKey = channelId;
|
||||||
|
const existing = this._pendingScrobbleTimers.get(pendingKey);
|
||||||
|
if (existing) {
|
||||||
|
clearTimeout(existing.timer);
|
||||||
|
this._pendingScrobbleTimers.delete(pendingKey);
|
||||||
|
}
|
||||||
|
|
||||||
// Send now-playing for each linked user
|
// Send now-playing for each linked user
|
||||||
for (const userId of humanUserIds) {
|
for (const userId of humanUserIds) {
|
||||||
lastfm.updateNowPlaying(userId, song).catch(() => {});
|
lastfm.updateNowPlaying(userId, song).catch(() => {});
|
||||||
@@ -914,7 +972,8 @@ export class PlayerManager {
|
|||||||
);
|
);
|
||||||
// Don't schedule if threshold is too far out (cap at 10 min)
|
// Don't schedule if threshold is too far out (cap at 10 min)
|
||||||
if (thresholdMs <= 600_000) {
|
if (thresholdMs <= 600_000) {
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
|
this._pendingScrobbleTimers.delete(pendingKey);
|
||||||
// Only scrobble if the same song is still playing
|
// Only scrobble if the same song is still playing
|
||||||
const current = player.queue?.getCurrent();
|
const current = player.queue?.getCurrent();
|
||||||
if (!current || player._destroyed || player.leaving) return;
|
if (!current || player._destroyed || player.leaving) return;
|
||||||
@@ -928,6 +987,9 @@ export class PlayerManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, thresholdMs);
|
}, thresholdMs);
|
||||||
|
|
||||||
|
// Store the timer so we can cancel it if startplay fires again
|
||||||
|
this._pendingScrobbleTimers.set(pendingKey, { timer, songUrl: song.url, startedAtMs });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,9 +256,38 @@ export class RecoveryManager {
|
|||||||
revoice: remix.revoice,
|
revoice: remix.revoice,
|
||||||
settingsMgr: remix.settingsMgr,
|
settingsMgr: remix.settingsMgr,
|
||||||
observedVoiceUsers: remix.observedVoiceUsers,
|
observedVoiceUsers: remix.observedVoiceUsers,
|
||||||
|
locale: remix.locale ?? null,
|
||||||
});
|
});
|
||||||
remix.players.setupEvents(p, { channelId: cleanChannelId, guildId });
|
remix.players.setupEvents(p, { channelId: cleanChannelId, guildId });
|
||||||
|
|
||||||
|
// ── Set a default textChannel so song announcements have somewhere to go ──
|
||||||
|
// After a reboot, spawned players don't have a user message to set
|
||||||
|
// textChannel from. Find the guild's announcement channel or the first
|
||||||
|
// available text channel as a fallback.
|
||||||
|
try {
|
||||||
|
const guild = remix.client.guilds.get(cleanGuildId) ?? remix.client.guilds.get(guildId);
|
||||||
|
const serverSet = remix.settingsMgr.getServer(guildId);
|
||||||
|
const cachedChId = remix._announcementChannelCache?.get?.(guildId)
|
||||||
|
?? serverSet?.get("announcementChannelId")
|
||||||
|
?? null;
|
||||||
|
let textCh = cachedChId ? guild?.channels?.get(String(cachedChId)) : null;
|
||||||
|
if (!textCh && guild) {
|
||||||
|
textCh = [...(guild.channels?.values?.() ?? [])].find(c =>
|
||||||
|
(c.isTextBased?.() ?? c.channel_type === "TextChannel" ?? true) &&
|
||||||
|
(c.permissionsFor?.(remix.client.user)?.has?.("SendMessages") ?? true)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (textCh) {
|
||||||
|
p.textChannel = textCh;
|
||||||
|
if (!cachedChId && serverSet) {
|
||||||
|
remix._announcementChannelCache?.set?.(guildId, textCh.id);
|
||||||
|
if (serverSet.get("announcementChannelId") !== textCh.id) {
|
||||||
|
serverSet.set("announcementChannelId", textCh.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
// ── Autoleave handler ───────────────────────────────────────────────────
|
// ── Autoleave handler ───────────────────────────────────────────────────
|
||||||
p.on("autoleave", async () => {
|
p.on("autoleave", async () => {
|
||||||
const activeChannelId = String(p._channelId ?? cleanChannelId).replace(/\D/g, "") || cleanChannelId;
|
const activeChannelId = String(p._channelId ?? cleanChannelId).replace(/\D/g, "") || cleanChannelId;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"forceleave": "اجعل Remix يغادر قناة حتى لو لم تكن فيها.",
|
"forceleave": "اجعل Remix يغادر قناة حتى لو لم تكن فيها.",
|
||||||
"invite": "احصل على رابط دعوة Remix وخادم الدعم.",
|
"invite": "احصل على رابط دعوة Remix وخادم الدعم.",
|
||||||
"join": "اجعل البوت ينضم إلى قناتك الصوتية، أو حدد قناة معينة.",
|
"join": "اجعل البوت ينضم إلى قناتك الصوتية، أو حدد قناة معينة.",
|
||||||
"leave": "اجعل البوت يغادر قناتك الصوتية الحالية.",
|
"leave": "اجعل البوت يغادر قناة صوتية. حدد قناة أو اتركها فارغة للقناة الحالية.",
|
||||||
"list": "اعرض قائمة الأغاني في قائمة انتظار قناتك الصوتية الحالية.",
|
"list": "اعرض قائمة الأغاني في قائمة انتظار قناتك الصوتية الحالية.",
|
||||||
"loop": "تفعيل/تعطيل تكرار قائمة الانتظار/الأغنية.",
|
"loop": "تفعيل/تعطيل تكرار قائمة الانتظار/الأغنية.",
|
||||||
"lyrics": "عرض كلمات الأغنية المتزامنة من NodeLink.",
|
"lyrics": "عرض كلمات الأغنية المتزامنة من NodeLink.",
|
||||||
@@ -241,10 +241,12 @@
|
|||||||
"voiceChannelUnknown": "قناة صوتية غير معروفة"
|
"voiceChannelUnknown": "قناة صوتية غير معروفة"
|
||||||
},
|
},
|
||||||
"leave": {
|
"leave": {
|
||||||
"noVoiceChannel": "⚠️ يرجى الانضمام إلى قناة صوتية أولاً.",
|
"noVoiceChannel": "⚠️ يرجى الانضمام إلى قناة صوتية أولاً، أو حدد واحدة: `{{prefix}}leave <#channel>`",
|
||||||
"notInVoice": "أنا لست في قناة صوتية.",
|
"notInVoice": "أنا لست في قناة صوتية.",
|
||||||
"joinChannel": "⚠️ يرجى الانضمام إلى {{channel}} لاستخدام هذا الأمر.",
|
"joinChannel": "⚠️ يرجى الانضمام إلى {{channel}} لاستخدام هذا الأمر.",
|
||||||
"multipleChannels": "⚠️ أنا أعزف في قنوات متعددة! يرجى الانضمام إلى إحداها:\n{{channels}}",
|
"multipleChannels": "⚠️ أنا أعزف في قنوات متعددة! يرجى الانضمام إلى إحداها:\n{{channels}}",
|
||||||
|
"specifyChannel": "⚠️ أنت لست في قناة صوتية. أنا أعزف في:\n{{channels}}\n\nاستخدم `{{prefix}}leave <#channel>` لمغادرة قناة محددة.",
|
||||||
|
"noPlayerInChannel": "⚠️ أنا لا أعزف في <#{{channel}}>. أنا في:\n{{channels}}",
|
||||||
"playerNotInit": "المشغّل غير مهيأ.",
|
"playerNotInit": "المشغّل غير مهيأ.",
|
||||||
"leftRejoin247": "✅ تم المغادرة بنجاح — سأعيد الانضمام إلى <#{{channel}}> خلال 5 ثوانٍ.\nلتعطيل وضع 24/7 بشكل دائم، استخدم `%247 off`.",
|
"leftRejoin247": "✅ تم المغادرة بنجاح — سأعيد الانضمام إلى <#{{channel}}> خلال 5 ثوانٍ.\nلتعطيل وضع 24/7 بشكل دائم، استخدم `%247 off`.",
|
||||||
"left247On": "✅ تم المغادرة بنجاح.\nℹ️ وضع 24/7 **مفعّل** — لن يعود البوت تلقائياً. استخدم `%play` لإعادته، أو `%247 off` لتعطيله بالكامل."
|
"left247On": "✅ تم المغادرة بنجاح.\nℹ️ وضع 24/7 **مفعّل** — لن يعود البوت تلقائياً. استخدم `%play` لإعادته، أو `%247 off` لتعطيله بالكامل."
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"forceleave": "بکە Remix لە کەناڵێک دەربچێت ئەگەر تۆ تێیدا نەبیت.",
|
"forceleave": "بکە Remix لە کەناڵێک دەربچێت ئەگەر تۆ تێیدا نەبیت.",
|
||||||
"invite": "بەستەری بانگکردنی Remix و سێرڤەری پشتگیری وەربگرە.",
|
"invite": "بەستەری بانگکردنی Remix و سێرڤەری پشتگیری وەربگرە.",
|
||||||
"join": "بۆتەکە بکە بچێتە کەناڵی دەنگی خۆت، یان یەکێک دیاریبکە.",
|
"join": "بۆتەکە بکە بچێتە کەناڵی دەنگی خۆت، یان یەکێک دیاریبکە.",
|
||||||
"leave": "بۆتەکە بکە کەناڵی دەنگی ئێستات بەجێبهێڵێت.",
|
"leave": "بۆتەکە کەناڵێکی دەنگی بەجێبهێڵێت. کەناڵێک دیاریبکە یان بەتاڵی بهێڵە بۆ کەناڵی ئێستات.",
|
||||||
"list": "لیستی گۆرانییەکانی ڕیزبەندیی کەناڵی دەنگی ئێستات نیشان بدە.",
|
"list": "لیستی گۆرانییەکانی ڕیزبەندیی کەناڵی دەنگی ئێستات نیشان بدە.",
|
||||||
"loop": "کردنەوە/داخستنی دووبارەکردنەوەی ڕیزبەندی/گۆرانی.",
|
"loop": "کردنەوە/داخستنی دووبارەکردنەوەی ڕیزبەندی/گۆرانی.",
|
||||||
"lyrics": "دەقی گۆرانیی هاوئاهەنگ لە NodeLink نیشان بدە.",
|
"lyrics": "دەقی گۆرانیی هاوئاهەنگ لە NodeLink نیشان بدە.",
|
||||||
@@ -241,10 +241,12 @@
|
|||||||
"voiceChannelUnknown": "کەناڵی دەنگی نەناسراو"
|
"voiceChannelUnknown": "کەناڵی دەنگی نەناسراو"
|
||||||
},
|
},
|
||||||
"leave": {
|
"leave": {
|
||||||
"noVoiceChannel": "⚠️ تکایە سەرەتا بەشداری کەناڵێکی دەنگی بکە.",
|
"noVoiceChannel": "⚠️ تکایە سەرەتا بەشداری کەناڵێکی دەنگی بکە، یان یەکێک دیاریبکە: `{{prefix}}leave <#channel>`",
|
||||||
"notInVoice": "من لە کەناڵێکی دەنگیدا نییم.",
|
"notInVoice": "من لە کەناڵێکی دەنگیدا نییم.",
|
||||||
"joinChannel": "⚠️ تکایە بەشداری {{channel}} بکە بۆ بەکارهێنانی ئەم فەرمانە.",
|
"joinChannel": "⚠️ تکایە بەشداری {{channel}} بکە بۆ بەکارهێنانی ئەم فەرمانە.",
|
||||||
"multipleChannels": "⚠️ من لە چەندین کەناڵدا پەخش دەکەم! تکایە بەشداری یەکێکیان بکە:\n{{channels}}",
|
"multipleChannels": "⚠️ من لە چەندین کەناڵدا پەخش دەکەم! تکایە بەشداری یەکێکیان بکە:\n{{channels}}",
|
||||||
|
"specifyChannel": "⚠️ تۆ لە کەناڵێکی دەنگیدا نیت. من پەخش دەکەم لە:\n{{channels}}\n\n`{{prefix}}leave <#channel>` بەکاربهێنە بۆ جێهێشتنی کەناڵێکی دیاریکراو.",
|
||||||
|
"noPlayerInChannel": "⚠️ من پەخش ناکەم لە <#{{channel}}>. من لە:\n{{channels}}",
|
||||||
"playerNotInit": "پەخشکەرەکە ئامادە نەکراوە.",
|
"playerNotInit": "پەخشکەرەکە ئامادە نەکراوە.",
|
||||||
"leftRejoin247": "✅ بە سەرکەوتوویی دەرچوو — دووبارە بەشداری <#{{channel}}> دەکەم لە 5 چرکەدا.\nبۆ ناچالاککردنی دۆخی 24/7 بەهەمیشەیی، `%247 off` بەکاربهێنە.",
|
"leftRejoin247": "✅ بە سەرکەوتوویی دەرچوو — دووبارە بەشداری <#{{channel}}> دەکەم لە 5 چرکەدا.\nبۆ ناچالاککردنی دۆخی 24/7 بەهەمیشەیی، `%247 off` بەکاربهێنە.",
|
||||||
"left247On": "✅ بە سەرکەوتوویی دەرچوو.\nℹ️ دۆخی 24/7 **چالاکە** — بۆتەکە دووبارە خۆی ناچێتەوە. `%play` بەکاربهێنە بۆ گەڕاندنی، یان `%247 off` بۆ ناچالاککردنی تەواو."
|
"left247On": "✅ بە سەرکەوتوویی دەرچوو.\nℹ️ دۆخی 24/7 **چالاکە** — بۆتەکە دووبارە خۆی ناچێتەوە. `%play` بەکاربهێنە بۆ گەڕاندنی، یان `%247 off` بۆ ناچالاککردنی تەواو."
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"forceleave": "Lass Remix einen Kanal verlassen, auch wenn du nicht darin bist.",
|
"forceleave": "Lass Remix einen Kanal verlassen, auch wenn du nicht darin bist.",
|
||||||
"invite": "Erhalte den Einladungslink für Remix und den Support-Server.",
|
"invite": "Erhalte den Einladungslink für Remix und den Support-Server.",
|
||||||
"join": "Lass den Bot deinem Sprachkanal beitreten oder gib einen bestimmten an.",
|
"join": "Lass den Bot deinem Sprachkanal beitreten oder gib einen bestimmten an.",
|
||||||
"leave": "Lass den Bot deinen aktuellen Sprachkanal verlassen.",
|
"leave": "Lass den Bot einen Sprachkanal verlassen. Gib einen Kanal an oder lass leer für deinen aktuellen.",
|
||||||
"list": "Liste die Songs in der Warteschlange deines aktuellen Sprachkanals auf.",
|
"list": "Liste die Songs in der Warteschlange deines aktuellen Sprachkanals auf.",
|
||||||
"loop": "Aktiviere/Deaktiviere die Schleife deiner Warteschlange/des Songs.",
|
"loop": "Aktiviere/Deaktiviere die Schleife deiner Warteschlange/des Songs.",
|
||||||
"lyrics": "Zeige synchronisierte Songtexte von NodeLink an.",
|
"lyrics": "Zeige synchronisierte Songtexte von NodeLink an.",
|
||||||
@@ -241,10 +241,12 @@
|
|||||||
"voiceChannelUnknown": "unbekannter Sprachkanal"
|
"voiceChannelUnknown": "unbekannter Sprachkanal"
|
||||||
},
|
},
|
||||||
"leave": {
|
"leave": {
|
||||||
"noVoiceChannel": "⚠️ Bitte trete zuerst einem Sprachkanal bei.",
|
"noVoiceChannel": "⚠️ Bitte trete zuerst einem Sprachkanal bei oder gib einen an: `{{prefix}}leave <#channel>`",
|
||||||
"notInVoice": "Ich bin in keinem Sprachkanal.",
|
"notInVoice": "Ich bin in keinem Sprachkanal.",
|
||||||
"joinChannel": "⚠️ Bitte trete {{channel}} bei, um diesen Befehl zu nutzen.",
|
"joinChannel": "⚠️ Bitte trete {{channel}} bei, um diesen Befehl zu nutzen.",
|
||||||
"multipleChannels": "⚠️ Ich spiele in mehreren Kanälen! Bitte trete einem bei:\n{{channels}}",
|
"multipleChannels": "⚠️ Ich spiele in mehreren Kanälen! Bitte trete einem bei:\n{{channels}}",
|
||||||
|
"specifyChannel": "⚠️ Du bist in keinem Sprachkanal. Ich spiele in:\n{{channels}}\n\nNutze `{{prefix}}leave <#channel>` um einen bestimmten Kanal zu verlassen.",
|
||||||
|
"noPlayerInChannel": "⚠️ Ich spiele nicht in <#{{channel}}>. Ich bin in:\n{{channels}}",
|
||||||
"playerNotInit": "Player nicht initialisiert.",
|
"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`.",
|
"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.\n💡 Nutze `%247` um alle gespeicherten Kanäle zu sehen."
|
"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."
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"forceleave": "Make Remix leave a channel even if you're not in it.",
|
"forceleave": "Make Remix leave a channel even if you're not in it.",
|
||||||
"invite": "Get the invite link for Remix and the support server.",
|
"invite": "Get the invite link for Remix and the support server.",
|
||||||
"join": "Make the bot join your voice channel, or specify one.",
|
"join": "Make the bot join your voice channel, or specify one.",
|
||||||
"leave": "Make the bot leave your current voice channel.",
|
"leave": "Make the bot leave a voice channel. Specify a channel or leave blank for your current one.",
|
||||||
"lastfm": "Link your Last.fm account, toggle scrobbling, or view your profile.",
|
"lastfm": "Link your Last.fm account, toggle scrobbling, or view your profile.",
|
||||||
"list": "List the songs in the queue of your current voice channel.",
|
"list": "List the songs in the queue of your current voice channel.",
|
||||||
"loop": "Toggle the looping of your queue/song.",
|
"loop": "Toggle the looping of your queue/song.",
|
||||||
@@ -246,10 +246,12 @@
|
|||||||
"voiceChannelUnknown": "unknown voice channel"
|
"voiceChannelUnknown": "unknown voice channel"
|
||||||
},
|
},
|
||||||
"leave": {
|
"leave": {
|
||||||
"noVoiceChannel": "⚠️ Please join a voice channel first.",
|
"noVoiceChannel": "⚠️ Please join a voice channel first, or specify one: `{{prefix}}leave <#channel>`",
|
||||||
"notInVoice": "I'm not in a voice channel.",
|
"notInVoice": "I'm not in a voice channel.",
|
||||||
"joinChannel": "⚠️ Please join {{channel}} to use this command.",
|
"joinChannel": "⚠️ Please join {{channel}} to use this command.",
|
||||||
"multipleChannels": "⚠️ I'm playing in multiple channels! Please join one of them:\n{{channels}}",
|
"multipleChannels": "⚠️ I'm playing in multiple channels! Please join one of them:\n{{channels}}",
|
||||||
|
"specifyChannel": "⚠️ You're not in a voice channel. I'm playing in:\n{{channels}}\n\nUse `{{prefix}}leave <#channel>` to leave a specific channel.",
|
||||||
|
"noPlayerInChannel": "⚠️ I'm not playing in <#{{channel}}>. I'm in:\n{{channels}}",
|
||||||
"playerNotInit": "Player not initialized.",
|
"playerNotInit": "Player not initialized.",
|
||||||
"leftRejoin247": "✅ Successfully Left — rejoining <#{{channel}}> in 5 seconds.\nTo disable 24/7 mode permanently, use `%247 off`.",
|
"leftRejoin247": "✅ Successfully Left — rejoining <#{{channel}}> in 5 seconds.\nTo disable 24/7 mode permanently, use `%247 off`.",
|
||||||
"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."
|
"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."
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"forceleave": "Faça o Remix sair de um canal mesmo que você não esteja nele.",
|
"forceleave": "Faça o Remix sair de um canal mesmo que você não esteja nele.",
|
||||||
"invite": "Obtenha o link de convite do Remix e do servidor de suporte.",
|
"invite": "Obtenha o link de convite do Remix e do servidor de suporte.",
|
||||||
"join": "Faça o bot entrar no seu canal de voz ou especifique um.",
|
"join": "Faça o bot entrar no seu canal de voz ou especifique um.",
|
||||||
"leave": "Faça o bot sair do seu canal de voz atual.",
|
"leave": "Faça o bot sair de um canal de voz. Especifique um canal ou deixe em branco para o atual.",
|
||||||
"list": "Liste as músicas na fila do seu canal de voz atual.",
|
"list": "Liste as músicas na fila do seu canal de voz atual.",
|
||||||
"loop": "Ative/desative o loop da fila/música.",
|
"loop": "Ative/desative o loop da fila/música.",
|
||||||
"lyrics": "Exiba letras sincronizadas do NodeLink.",
|
"lyrics": "Exiba letras sincronizadas do NodeLink.",
|
||||||
@@ -241,10 +241,12 @@
|
|||||||
"voiceChannelUnknown": "canal de voz desconhecido"
|
"voiceChannelUnknown": "canal de voz desconhecido"
|
||||||
},
|
},
|
||||||
"leave": {
|
"leave": {
|
||||||
"noVoiceChannel": "⚠️ Por favor, entre em um canal de voz primeiro.",
|
"noVoiceChannel": "⚠️ Por favor, entre em um canal de voz primeiro ou especifique um: `{{prefix}}leave <#channel>`",
|
||||||
"notInVoice": "Não estou em um canal de voz.",
|
"notInVoice": "Não estou em um canal de voz.",
|
||||||
"joinChannel": "⚠️ Por favor, entre em {{channel}} para usar este comando.",
|
"joinChannel": "⚠️ Por favor, entre em {{channel}} para usar este comando.",
|
||||||
"multipleChannels": "⚠️ Estou tocando em vários canais! Por favor, entre em um deles:\n{{channels}}",
|
"multipleChannels": "⚠️ Estou tocando em vários canais! Por favor, entre em um deles:\n{{channels}}",
|
||||||
|
"specifyChannel": "⚠️ Você não está em um canal de voz. Estou tocando em:\n{{channels}}\n\nUse `{{prefix}}leave <#channel>` para sair de um canal específico.",
|
||||||
|
"noPlayerInChannel": "⚠️ Não estou tocando em <#{{channel}}>. Estou em:\n{{channels}}",
|
||||||
"playerNotInit": "Player não inicializado.",
|
"playerNotInit": "Player não inicializado.",
|
||||||
"leftRejoin247": "✅ Sai com sucesso — reentrando em <#{{channel}}> em 5 segundos.\nPara desativar o modo 24/7 permanentemente, use `%247 off`.",
|
"leftRejoin247": "✅ Sai com sucesso — reentrando em <#{{channel}}> em 5 segundos.\nPara desativar o modo 24/7 permanentemente, use `%247 off`.",
|
||||||
"left247On": "✅ Sai com sucesso.\nℹ️ O modo 24/7 está **ativo** — o bot não voltará automaticamente. Use `%play` para trazê-lo de volta ou `%247 off` para desativar completamente."
|
"left247On": "✅ Sai com sucesso.\nℹ️ O modo 24/7 está **ativo** — o bot não voltará automaticamente. Use `%play` para trazê-lo de volta ou `%247 off` para desativar completamente."
|
||||||
|
|||||||
Reference in new issue
Block a user