Compare commits

..
4 Commits
Author SHA1 Message Date
NoLogicAlan c0c95610ac feat(player): add %skipto command, empty voice auto-pause, and server mute guard 2026-10-27 03:47:02 +03:00
NoLogicAlan dfe77d86b9 docs(readme): ... 2026-10-27 03:20:04 +03:00
NoLogicAlan 5dc286e364 feat(docs): update README with playback history and instant replay features
refactor(commands): remove unused imports from various command files
refactor(src): clean up imports in multiple source files for better organization (#21)
2026-10-27 03:11:37 +03:00
NoLogicAlan e33fbb2fdb feat(player): add %previous, %replay, livekit skip guard, and nodelink auto-reconnect (#11, #13, #18, #19, #23) 2026-10-27 02:58:26 +03:00
34 changed files with 837 additions and 673 deletions

No files matched your search

+183 -598
View File
@@ -7,655 +7,240 @@
<h1 align="center">Remix</h1>
<p align="center">
<strong>A premium, high-quality, and open-source music bot for Fluxer.</strong>
<strong>A modern, high-performance, and open-source music bot for Fluxer.</strong>
</p>
<p align="center">
<a href="https://web.fluxer.app/oauth2/authorize?client_id=1478084469635211806&scope=bot&permissions=3206208">Invite to Server</a> &middot;
<a href="https://fluxer.gg/Remix">Report a Bug</a> &middot;
<a href="https://fluxer.gg/Remix">Request a Feature</a>
<a href="https://web.fluxer.app/oauth2/authorize?client_id=1478084469635211806&scope=bot&permissions=3206208">Invite Remix</a> &middot;
<a href="https://fluxer.gg/remix">Join Support Server</a> &middot;
<a href="https://github.com/remix-bot/fluxer/issues">Report an Issue</a>
</p>
<p align="center">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
<img src="https://img.shields.io/badge/Node.js-%3E%3D22.13.0-339933.svg" alt="Node.js">
<img src="https://img.shields.io/badge/ESM-Modules-yellow.svg" alt="ESM">
<img src="https://img.shields.io/badge/Audio-lavalink--client%20%2B%20NodeLink-orange.svg" alt="lavalink-client">
<img src="https://img.shields.io/badge/Voice-%40fluxerjs%2Fvoice%20(LiveKit)-9b59b6.svg" alt="@fluxerjs/voice">
<img src="https://img.shields.io/badge/Database-MySQL-4479A1.svg" alt="MySQL">
<img src="https://img.shields.io/badge/Voice-LiveKit%20%2B%20NodeLink-orange.svg" alt="Audio Engine">
<img src="https://img.shields.io/badge/Database-MySQL-4479A1.svg" alt="Database">
<img src="https://img.shields.io/badge/Languages-6%20Locales-9b59b6.svg" alt="Localization">
<img src="https://img.shields.io/badge/Maintained%3F-Yes-green.svg" alt="Maintained">
</p>
---
## Table of Contents
## 🌟 Overview
- [About The Project](#-about-the-project)
- [How Audio Playback Works](#-how-audio-playback-works)
- [Features](#-features)
- [Getting Started (Users)](#-getting-started-users)
- [Commands](#-commands)
- [Self-Hosting](#-self-hosting-the-bot)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Database Setup](#-database-setup)
- [Dashboard Setup (Optional)](#-dashboard-setup-optional)
- [Configuration Reference](#-configuration-reference)
- [Project Architecture](#-project-architecture)
- [The Layered Codebase](#-the-layered-codebase)
- [Localization](#-localization)
- [Scripts](#-npm-scripts)
- [Credits](#-credits--license)
**Remix** is a feature-rich, self-hostable music bot built specifically for [Fluxer](https://fluxer.app). Built on [`@fluxerjs/core`](https://github.com/fluxerjs/core) and [`@fluxerjs/voice`](https://github.com/fluxerjs/voice), it streams ultra-low-latency Opus audio directly to LiveKit voice channels using an optimized [NodeLink](https://github.com/PerformanC/NodeLink) backend.
We believe essential music features should never be locked behind a paywall — **every feature on Remix is 100% free and open-source.**
---
## About The Project
## ⚡ Highlights & Features
Remix is a free and open-source music bot for [Fluxer](https://fluxer.app), built with [`@fluxerjs/core`](https://github.com/fluxerjs/core) for the Fluxer API and [`@fluxerjs/voice`](https://github.com/fluxerjs/voice) for LiveKit voice connections. Track search and streaming are handled by [`lavalink-client`](https://www.npmjs.com/package/lavalink-client) talking to a [NodeLink](https://github.com/PerformanC/NodeLink) audio node (Lavalink-compatible), and the bot publishes Opus audio to LiveKit as a participant — with a custom WebM/Opus pipeline (zero-re-encode passthrough and remux where possible).
We believe music features shouldn't be locked behind paywalls — **all commands on Remix are 100% free and always will be.**
### Fluxer.js 3.0
Remix runs on **`@fluxerjs/core` / `@fluxerjs/util` / `@fluxerjs/voice` 3.0.0** plus **`@fluxerjs/sharding` 3.0.0** (see the [changelog](https://fluxer.js.org/changelog/)). The v3 DX overhaul required only five code-level changes in this codebase — everything else (event names, gateway opcodes, permission flags, the voice/LiveKit API, `EmbedBuilder`, message `reply`/`edit`/`react`, the raw `VOICE_STATE_UPDATE` / `VoiceStatesSync` payloads this bot tracks) is unchanged between 2.2 and 3.0:
1. `package.json` — the three `@fluxerjs/*` ranges moved from `^2.2.0` to `^3.0.0` (a `^2.2.0` range will not install 3.0).
2. `src/core/Bot.mjs` — the `Client` `presence` option now uses the normalized v3 shape (`customStatus`/`emojiName`/`emojiId`) instead of the 2.2 wire format (`custom_status`); the deprecated no-op `suppressIntentWarning` option was dropped.
3. `src/voice/gateway/GatewayHandler.mjs` — the presence-rotation sender wraps its `client.ws` access in a try/catch, because 3.0 exposes `client.ws` as a getter that throws when the gateway is not connected (2.2 exposed a plain optional). The rotation payload itself stays in wire format because it sends opcode 3 straight to the shard.
4. `src/ui/MessageHandler.mjs` — `joinChannel()` checks `channel.isGuild?.()` first (the new ChannelType-based guard) and keeps the legacy `"guildId" in channel` check as a fallback for stub objects.
5. `src/utils/ShardingUtils.mjs` (new) — 3.0 removed the WebSocketManager's `shards` Map property in favour of `getShards()`/`getShard()` methods, which had silently disabled the bot's raw-socket listeners (they no-op'd behind their existing guards). All five readers — Bot.mjs's WS error handlers, GatewayHandler's raw listener and presence sender, LavalinkManager's payload routing and raw listener — now go through version-agnostic helpers that also make them shard-aware (see below).
Two 3.0 library-level notes that need no code change here: the WS manager no longer emits `shardCreate` (the bot's 5-second handler re-arm loop covers re-attachment), and `Guild.description` was removed from the core structures (the dashboard serializer already null-guards it, so server descriptions simply render empty). Passing `intents` or `suppressIntentWarning` inside `config["fluxer.js"]` is still accepted — both are documented deprecated no-ops in 3.0.
### Sharding (optional)
`@fluxerjs/sharding` 3.0.0 (beta) is wired in as an **opt-in** layer — the default single-process boot (`npm start` / `node index.mjs`) is byte-for-byte unchanged, and none of the sharding code paths activate unless the process was actually forked by the manager (it sets `FLUXER_SHARD_IDS` *and* provides an IPC channel; manually exporting the variables does nothing).
- **Supervisor:** `node shard.mjs` (or `npm run shard`) forks one child per shard slice, each running the ordinary `index.mjs` boot. The manager owns the shared per-IP IDENTIFY budget so children can never collectively exceed the gateway limit, respawns dead children, and exposes `broadcastEval` / `fetchClientValues` / `respawnAll`.
- **Child side:** `src/core/Bot.mjs` attaches the library's `ShardClientUtil` before `login()` (it applies the shard slice to the client options) and calls `notifyReady()` after login so the supervisor's spawn promise resolves. A failed attach under a manager is fatal by design — without its slice the child would identify as shard 0 like every other child and thrash the gateway sessions.
- **Guild→shard routing:** opcode-4 voice payloads from LavalinkManager now target `shardIdForGuildId(guildId)` instead of hardcoded shard 0, presence updates fan out to every gateway shard in the process, and raw-socket listeners attach to *all* local shard sockets. Unsharded, every one of these degrades to exactly the previous shard-0 behavior.
Configuration (config.json, all optional — defaults shown):
```json
"sharding": { "totalShards": 1, "shardsPerProcess": 1, "respawn": true,
"spawnTimeout": 30000, "spawnDelay": 5000 }
```
`FLUXER_TOTAL_SHARDS` / `FLUXER_SHARDS_PER_PROCESS` env vars override the config (Docker Compose runs `node shard.mjs` by default). Prefer an explicit `totalShards` — Fluxer's `/gateway/bot` always reports `shards: 1`, so there is no reliable `"auto"`.
Beta caveats worth knowing: DMs and guild-less events only reach shard 0 (library limitation); each child opens its own MySQL/Redis/Lavalink connections and its own dashboard RPC subscription, so the dashboard is currently single-process-first — guilds on other shards won't be reachable from it, and concurrent `storage/stats.json` writes across children can race. The stock `node index.mjs` deployment has none of these issues.
* 🎵 **Low-Latency Zero-Re-Encode Audio** — Direct WebM/Opus streaming pipeline published over LiveKit with instant start times and zero CPU re-encoding overhead.
* 🔎 **Universal Music Search** — Seamless search and playback across YouTube, YouTube Music, Spotify, SoundCloud, Deezer, Apple Music, Tidal, Bandcamp, Bilibili, plus direct HTTP/HTTPS and radio streams.
* 🔄 **24/7 Voice Persistence** — Keeps the bot in designated voice channels around the clock with exponential backoff recovery, boot rejoin, and state restore across restarts.
* ⏪ **Playback History & `%previous`** — Dedicated 20-track circular playback history ring buffer to step backward (`%previous`, `%undo`) without lost tracks.
* ⏸️ **Smart Auto-Pause & Mute Protection** — Automatically pauses playback when voice channels empty (auto-resuming when members return) or when server-muted by administrators.
* 🔁 **Instant Track Replay** — Restart the current song from 0:00 with `%replay` (or `%restart`) without re-fetching network streams.
* 🎛️ **Audio Filters & DSP Studio** — Real-time audio transformations: Bassboost (low/medium/hard), Nightcore, Vaporwave, 8D audio, and fine-grained `%speed` & `%pitch` tuning.
* 📊 **Loudness Normalization** — Built-in EBU R128 / ReplayGain leveling (`%normalize`) to eliminate volume jumps between quiet acoustic songs and loud EDM tracks.
* 📈 **Comprehensive Last.fm Suite** — Real-time scrobbling, loved tracks synchronization, artist crowns, server leaderboards, profile cards, and automated similar-track autoplay.
* 📑 **Massive Playlist Ingestion** — Asynchronous chunked ingestion for large Spotify and SoundCloud playlists (>100 tracks) with instant playback start on song #1.
* 🌐 **Full 6-Language Localization** — English, Arabic, Kurdish (Sorani), Turkish, German, and Brazilian Portuguese.
* 🛡️ **Hardened Security & Reliability** — Built-in SSRF protection with DNS-rebinding guards (`SafeHttp`) and automated credential redaction (`[REDACTED]`) in owner diagnostics.
---
## How Audio Playback Works
## 🚀 Getting Started
Understanding the pipeline helps when debugging or contributing:
```
%play → LavalinkManager.search() ──► NodeLink (track resolution only)
→ Player queue → FluxerAudioBridge.play(voiceConnection, track)
├─ /v4/trackstream → direct WebM/Opus passthrough (no re-encode)
├─ /v4/loadstream → magic-byte sniffing:
│ • WebM (1A45DFA3) → passthrough to LiveKit
│ • OggS → OggDemuxer → WebMOpusMuxer (remux, no re-encode)
│ • raw PCM → OpusEncoder (opusscript)
│ → WebMOpusMuxer → LiveKit
└─ conn.play() → @fluxerjs/voice LiveKit connection (bot publishes audio
as a LiveKit participant)
```
A few things worth knowing:
- **No Lavalink players are created.** NodeLink is used for search and its REST stream/lyrics endpoints (`/v4/loadstream`, `/v4/trackstream`, `/v4/loadlyrics`); playback itself is pure LiveKit publishing.
- **Seek / pause / resume** work by stopping the current stream and re-requesting it at an offset from NodeLink.
- **Filters** (bassboost, nightcore, etc.) are applied server-side by NodeLink, so they take effect on the next track that starts.
- **Volume** is applied client-side by the LiveKit connection (1–200).
- Radio metadata (StreamTitle) is read with **ffprobe** (`ffprobe-static`).
- **Bilibili playback (fully anonymous — no cookies)** — `%play https://www.bilibili.com/video/BV…` (b23.tv short links and `?p=` parts included) resolves the video through Bilibili's web API and feeds it to the node through a signed localhost proxy that attaches the Referer/User-Agent headers Bilibili's CDN requires. Multi-part videos queue like a playlist. Requests use Bilibili's WBI-signed endpoints (derived anonymously from the nav payload), which survive the HTTP 412 risk-control blocks that reject plain unsigned API calls on many hosting IPs; on any WBI failure the bot automatically retries through the legacy unsigned endpoints. Playurl calls carry the anonymous `try_look=1` flag and prefer the best DASH audio stream (~130–170 kbps AAC) — real DASH audio works without login — falling back to the html5 progressive mp4 for videos without DASH audio, and multi-segment progressive streams are served back-to-back through the proxy's concatenating mode with Range/seek support. The bot generates and manages its Bilibili device fingerprint (buvid3/buvid4/b_nut) automatically and retries once with a fresh fingerprint when risk control interferes. The proxy binds `127.0.0.1` by default — set `bilibili.advertiseHost` (and `bind: "0.0.0.0"`) when your node runs on another machine.
### Invite to Your Server
1. Click here to **[Invite Remix](https://web.fluxer.app/oauth2/authorize?client_id=1478084469635211806&scope=bot&permissions=3206208)** to your Fluxer server.
2. Join any voice channel.
3. Type `%play <song title or URL>` to start listening!
---
## Features
## 📖 Command Reference
- **High-quality audio playback** — NodeLink streaming with a zero-re-encode WebM/Opus pipeline, published over LiveKit
- **Multi-source search** — YouTube, YT Music, Spotify, SoundCloud, Deezer, Apple Music, Tidal, Bandcamp and 40+ more provider prefixes, plus direct URLs and Bilibili videos
- **24/7 mode** — keep the bot in a voice channel permanently, with staggered auto-rejoin on boot and rejoin retries on connection loss
- **Interactive emoji player** — reaction-based control panel with live progress, lyrics viewer, and a filter submenu
- **Lyrics** — synced lyrics via NodeLink
- **Radio stations** — built-in support for custom radio streams with keyword-based search
- **Last.fm integration** — account linking, scrobbling, now-playing, play loved/top/recent/albums, whoknows, crowns, compare, leaderboards, and profiles
- **Autoplay** — automatically play similar tracks when the queue ends (powered by Last.fm)
- **Seek** — jump to a specific position in the current track
- **Track options** — set custom start/end times per track, great for album compilations and hidden tracks
- **Queue move** — reorder tracks by moving them to a different position
- **Audio filters & DSP effects** — real-time equalizer bassboost (low/medium/hard), nightcore, vaporwave, 8D audio, and fine-grained `%speed` & `%pitch` controls
- **Dynamic volume normalization** — ReplayGain & EBU R128 loudness leveling across YouTube, Spotify, and SoundCloud (`%normalize`)
- **Large playlist streaming** — background chunked ingestion for massive Spotify & SoundCloud playlists (>100 tracks) with instant playback start
- **Server settings** — per-guild configuration (prefix, volume, locale, 24/7 channels, …) stored in MySQL
- **Dashboard backend** — optional Redis-RPC backend that an external web frontend uses to monitor players and control playback remotely
- **Multi-language support** — English, Arabic, German, Kurdish (Sorani), Brazilian Portuguese, and Turkish
- **Configurable logging** — granular control over which log categories appear in the console
- **Graceful shutdown & Queue Persistence** — flushes active player queues and playback positions into MySQL (`player_state`) before cleanly destroying players and closing MySQL/Redis/NodeLink sessions on SIGINT/SIGTERM/SIGUSR2
- **Module system** — pluggable module architecture for extending bot functionality (`storage/modules.json`)
The default prefix is `%`. Server administrators can customize the prefix at any time using `%settings set prefix <new_prefix>`.
---
### 🎵 Playback & Controls
## Getting Started (Users)
Want to use Remix in your server right away?
1. **[Invite Remix](https://web.fluxer.app/oauth2/authorize?client_id=1478084469635211806&scope=bot&permissions=3206208)** to your Fluxer server.
2. Join a voice channel.
3. Use the `%help` command to see everything the bot can do, or jump straight in with `%play <song name>`.
---
## Commands
Below is the complete list of Remix's commands. The default prefix is `%`.
### Music
| Command | Description | Usage | Aliases |
| Command | Aliases | Description | Example |
| :--- | :--- | :--- | :--- |
| `play` | Play a song from a URL, search query, or playlist | `%play Never Gonna Give You Up` / `%play lastfm:loved` | `p` |
| `playnext` | Add a song/playlist to the *top* of the queue | `%playnext query: text` | `pn` |
| `pause` | Pause the current playback | `%pause` | |
| `resume` | Resume the paused playback | `%resume` | |
| `skip` | Skip the currently playing song | `%skip` | `s` |
| `np` | Show the currently playing song | `%np` | `current`, `nowplaying` |
| `list` | View the upcoming queue | `%list` | `queue`, `q` |
| `loop` | Toggle loop mode (song or queue) | `%loop queue` | |
| `shuffle` | Randomize the queue order | `%shuffle` | |
| `remove` | Remove a specific song by its queue index | `%remove 3` | |
| `clear` | Clear the entire queue | `%clear` | `c` |
| `volume` | Change the playback volume (1–200) | `%volume 50` | `v`, `vol` |
| `volumedefault` | Set the default volume for the server | `%volumedefault 80` | `vd` |
| `search` | Search for a track and pick from results | `%search query` | |
| `lyrics` | Display synced lyrics from NodeLink | `%lyrics` | `lyric`, `ly` |
| `thumbnail` | Get the thumbnail of the current track | `%thumbnail` | `thumb` |
| `radio` | Play a built-in or custom radio station | `%radio` | `r` |
| `filter` | Interactive audio filter picker (bass, speed, nightcore, 8D, etc.) | `%filter` | `filters`, `fx`, `effect` |
| `bassboost` | Apply a low, medium, or hard bass boost equalizer | `%bassboost hard` | `bb`, `bass` |
| `speed` | Adjust playback speed multiplier (0.5×–2.0×) in real time | `%speed 1.25` | `rate`, `tempo` |
| `pitch` | Adjust audio pitch multiplier (0.5×–2.0×) in real time | `%pitch 1.2` | `semitone`, `tune` |
| `normalize` | Toggle dynamic volume normalization & ReplayGain leveling | `%normalize` / `%normalize on` | `replaygain`, `volumenormalize`, `norm` |
| `player` | Create an interactive emoji control panel with live progress | `%player` | |
| `join` | Make the bot join a specific voice channel | `%join 123456789` | |
| `leave` | Make the bot leave the current voice channel | `%leave` | `l`, `stop` |
| `forceleave` | Force the bot to leave any channel (requires Manage Channels) | `%forceleave` | `fl` |
| `seek` | Seek to a specific position in the current track | `%seek 1:30` / `%seek 90` | |
| `move` | Move a track from one position to another in the queue | `%move 2 5` | `mv`, `m` |
| `autoplay` | Toggle autoplay — automatically play similar tracks when queue ends | `%autoplay` | `ap` |
| `trackopt` | Set custom start/end times for tracks | `%trackopt set 0:30 3:45` | `to` |
| `play` | `p` | Play a track, search query, or playlist | `%play Blinding Lights` |
| `playnext` | `pn` | Insert a song at the very top of the queue | `%playnext Starboy` |
| `pause` | — | Pause audio playback | `%pause` |
| `resume` | — | Resume paused playback | `%resume` |
| `skip` | `s` | Skip to the next track (vote-skip in busy rooms) | `%skip` |
| `previous` | `prev`, `back`, `undo` | Play the previous song from history | `%previous` |
| `replay` | `restart` | Restart the currently playing song from 0:00 | `%replay` |
| `seek` | — | Jump to a specific timestamp in the track | `%seek 1:45` |
| `np` | `current`, `nowplaying` | Show detailed now-playing track card | `%np` |
| `volume` | `v`, `vol` | Adjust playback volume (1–200%) | `%volume 85` |
| `volumedefault` | `vd` | Set default volume for the server | `%volumedefault 75` |
| `autoplay` | `ap` | Toggle similar-track autoplay when queue ends | `%autoplay on` |
| `normalize` | `norm`, `replaygain` | Toggle dynamic loudness normalization | `%normalize on` |
### Utility
### 📑 Queue Management
| Command | Description | Usage | Aliases |
| Command | Aliases | Description | Example |
| :--- | :--- | :--- | :--- |
| `ping` | Check the bot's latency and connection health | `%ping` | `latency`, `pong` |
| `settings` | View or change server settings (requires Manage Server) | `%settings set` | `prefix`, `pfx`, `247` |
| `stats` | Display bot stats (uptime, ping, player count, stored scrobbles) | `%stats` | `info`, `botinfo`, `about` |
| `invite` | Get the bot invite link | `%invite` | `addbot`, `remix` |
| `support` | Get an invite to the support server | `%support` | `server` |
| `lastfm` | Link Last.fm, toggle scrobbling, view profile, love/unlove tracks, top artists, play tracks, leaderboard | `%lastfm link` / `%lastfm love` / `%lastfm artists` / `%lastfm lb` | `lf`, `lfm` |
| `vote` | Check FluxerList voters for the bot | `%vote` | |
| `logtest` | Send a test entry to your error-log channel (owner) | `%logtest` | |
| `reload` | Reload commands or modules at runtime (owner) | `%reload` | |
| `servers` | List servers the bot is in (owner) | `%servers` | |
| `eval` | Evaluate JavaScript (owner only) | `%eval 1+1` | |
| `debug` | Debug voice connections and player state (owner) | `%debug voice` | |
| `test` | Show voice channel user counts (owner) | `%test` | |
| `list` | `queue`, `q` | Display interactive paginated queue | `%list` |
| `skipto` | `jump`, `jumpto` | Skip directly to track #X in the queue | `%skipto 4` |
| `shuffle` | — | Randomize the order of queued tracks | `%shuffle` |
| `move` | `mv`, `m` | Move a song from one position to another | `%move 4 1` |
| `remove` | — | Remove a track or range from the queue | `%remove 3` / `%remove 5-8` |
| `clear` | `c` | Clear upcoming tracks or a range | `%clear` / `%clear 2 10` |
| `loop` | — | Toggle repeat mode (`song`, `queue`, or `off`) | `%loop queue` |
| `trackopt` | `to` | Configure custom start/end timestamps | `%trackopt set 0:30 3:15` |
## Self-Hosting The Bot
### 🎛️ Audio Effects & Filters
If you prefer to host Remix yourself, please note: **You must make it clear that your bot is an instance of Remix.** Change the bot's name and give credit in the bot's profile (e.g., *"Powered by [Remix](https://github.com/remix-bot/fluxer)"*).
### Quick Start with Docker (Recommended)
The fastest way to self-host Remix is with Docker. Everything — the bot, MySQL, Redis, and NodeLink — runs in containers with a single command. All Docker files live in the `docker/` folder.
1. **Clone and configure:**
```bash
git clone https://github.com/remix-bot/fluxer.git
cd fluxer/docker
cp config_example.json config.json
cp .env.example .env # optional — compose has working defaults
```
2. **Edit `config.json`** — fill in your bot token, MySQL credentials (defaults match the compose MySQL service), NodeLink details (defaults match the compose NodeLink service), and your owner IDs. Spotify/Deezer/Apple Music credentials are configured on the **NodeLink side** (`nodelink.config.json`), not in the bot config.
3. **Edit `.env`** (optional) — MySQL passwords, host port mappings (`WEB_PORT`, `NODELINK_PORT`), and timezone.
4. **Start everything:**
```bash
docker compose up -d
```
5. **Check logs:**
```bash
docker compose logs -f bot
```
That's it. The bot will start, connect to MySQL (Last.fm and track-options tables are auto-created), connect to NodeLink, and log in to Fluxer.
#### Docker file structure
```
docker/
├── Dockerfile # Multi-stage build (Node 22 + tini, non-root user, healthcheck)
├── docker-entrypoint.sh # Writes config.json from CONFIG_JSON env var on first boot
├── docker-compose.yml # bot + MySQL + Redis + NodeLink
├── .env.example # Compose env template (MySQL creds, ports, TZ)
├── config_example.json # Docker-friendly config template
├── config.json # You create this (gitignored)
├── .env # You create this (gitignored)
└── nodelink.config.json # NodeLink audio node config
```
#### Docker services
| Service | Container | Port | Purpose |
| Command | Aliases | Description | Example |
| :--- | :--- | :--- | :--- |
| `bot` | remix-bot | `${WEB_PORT:-8080}` → 80 | The Remix bot (+ optional dashboard backend) |
| `mysql` | remix-mysql | — | Settings, Last.fm users, and track options storage |
| `redis` | remix-redis | — | Dashboard RPC pub/sub (optional) |
| `nodelink` | remix-nodelink | `${NODELINK_PORT:-3000}` | Lavalink-compatible audio node |
| `filter` | `fx`, `effect` | Interactive filter picker menu | `%filter` |
| `bassboost` | `bb`, `bass` | Apply bass boost (`low`, `medium`, `hard`, `off`) | `%bassboost medium` |
| `speed` | `rate`, `tempo` | Adjust playback speed multiplier (0.5×–2.0×) | `%speed 1.2` |
| `pitch` | `semitone`, `tune` | Adjust pitch multiplier (0.5×–2.0×) | `%pitch 1.15` |
#### Useful Docker commands
### 📊 Last.fm Suite
```bash
# Run from the docker/ folder
cd docker
# Start all services
docker compose up -d
# View live bot logs
docker compose logs -f bot
# Restart the bot
docker compose restart bot
# Stop everything
docker compose down
# Stop and delete data volumes (full reset)
docker compose down -v
# Rebuild after code changes
docker compose up -d --build bot
```
#### Using `CONFIG_JSON` env var instead of a mounted file
If you prefer to keep your config in an environment variable (useful for CI/CD or secret managers), set `CONFIG_JSON` in your `.env`:
```bash
CONFIG_JSON={"token":"YOUR_TOKEN","mysql":{"host":"mysql","port":3306,"user":"remix","password":"remix_pw","database":"remix"},"nodelink":{"host":"nodelink","port":3000,"password":"youshallnotpass"}}
```
The entrypoint will write it to `/app/config.json` on first boot if no config file is mounted.
### Manual Installation (Without Docker)
#### Prerequisites
- **Node.js** >= 22.13.0
- **MySQL** 8.0+ with JSON column support
- **[NodeLink](https://github.com/PerformanC/NodeLink)** instance (Lavalink-compatible audio node)
- **Redis** (optional — required only for the dashboard backend)
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/remix-bot/fluxer.git
cd fluxer
```
2. **Install dependencies:**
```bash
npm install
```
3. **Configure the bot:**
```bash
cp config_example.json config.json
```
Open `config.json` and fill in the required values:
- `token` — your Fluxer bot token
- `mysql` — your MySQL connection details (host, port, user, password, database)
- `prefix` — the command prefix (default: `%`)
- `nodelink` — your NodeLink instance connection details
- `lastfm` — (optional) Last.fm API credentials for scrobbling/autoplay features
- `owners` — array of Fluxer user IDs with owner-only command access
4. **Set up the database:** *(See [Database Setup](#-database-setup) below)*
5. **Start the bot:**
```bash
npm start
```
For development with inspector:
```bash
npm run dev
```
### Database Setup
Remix requires a MySQL database to store per-guild settings and user data.
1. Create a dedicated database for Remix:
```sql
CREATE DATABASE remix;
```
2. Enter your MySQL connection details into `config.json`:
```json
"mysql": {
"host": "localhost",
"port": 3306,
"user": "remix",
"password": "your-password",
"database": "remix"
}
```
3. Create the required `settings` table:
```sql
CREATE TABLE `settings` (
`id` varchar(70) NOT NULL,
`data` json NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
```
4. Everything else is **auto-created on startup** if missing:
- `track_options` — per-user per-track start/end times (`%trackopt`)
- `lastfm_users` — Last.fm session keys and scrobble opt-ins
- `lastfm_stats` — stored scrobble/link counts
5. *(Optional)* If you need to clone or repair the settings table across bot IDs, run:
```bash
npm run migrate
```
### Dashboard Setup (Optional)
Remix ships the **backend half** of a web dashboard: a Redis-RPC service that an external frontend project talks to. There is no HTTP server or web UI in this repository.
1. Enable it in `config.json`:
```json
"dashboard": {
"enabled": true,
"redis": { "url": "redis://localhost:6379" }
}
```
2. How it works:
- The bot listens on Redis pub/sub channels (`request` / `response` / `info`) and answers JSON-RPC style requests with an `id` for correlation.
- Supported requests: `fetchPlayers`, `user`, `sharedServers`, `server`, `allServers`, `commands`, and `function` (remote actions: `join`, `pausePlayback`, `resumePlayback`, `skip`, `volume`, `addToQueue`, `voiceState`, `leave`, `testConnection`).
- Player updates are broadcast (debounced) on per-bot/per-player Redis channels so the frontend can render live state.
- **Login flow:** the external frontend writes login codes into the MySQL `login_codes` table; the bot verifies them with bcrypt hashes and marks them verified. Player control additionally requires the user to be in the same voice channel (owners are exempt).
3. **Security note:** the RPC channel has **no shared secret** — anything that can publish to your Redis can invoke the remote actions. Keep Redis network-isolated (as the Docker setup does) and don't expose it publicly.
---
## Configuration Reference
Key configuration options in `config.json`:
| Option | Type | Default | Description |
| Command | Aliases | Description | Example |
| :--- | :--- | :--- | :--- |
| `token` | string | — | **Required.** Fluxer bot token |
| `instanceUrl` | string/null | `null` | Base URL of a self-hosted Fluxer instance (leave null for fluxer.app) |
| `prefix` | string | `%` | Default command prefix |
| `embedColor` | string | `0xe9196c` | Hex color for embed messages |
| `owners` | string[] | `[]` | User IDs with owner privileges |
| `playerAFKTimeout` | number | `60000` | Inactivity timeout in ms before the player panel session ends |
| `customStatsFooter` | string | — | Custom text shown in the `%stats` embed footer |
| `presenceInterval` | number | `30000` | Interval in ms for rotating bot presence status |
| `presenceContents` | array | `[]` | Presence status messages to cycle through (strings or objects with `text`/`emoji_name`/`emoji_id`/`activity`) |
| `mysql` | object | — | **Required.** MySQL connection settings (`host`, `port`, `user`, `password`, `database`, `connectionLimit`) |
| `nodelink` | object | — | NodeLink connection (`host`, `port`, `password`, `requestTimeout`) |
| `audio` | object | — | Audio streaming options (`allowLoadstream: false` for zero-re-encode `/v4/trackstream`) |
| `bilibili` | object | — | Anonymous Bilibili proxy (`enabled`, `bind`, `port`, `advertiseHost`, `remoteProxy`, `remoteSecret`) |
| `lastfm` | object | — | Last.fm integration (`apiKey`, `apiSecret`, `scrobbleThreshold`, `scrobbleMinMs`) |
| `fluxerlist` | object | — | FluxerList integration (`apiKey`, `serverId`, `botId`, `serverSlug`, `botSlug`) |
| `dashboard` | object | — | Dashboard backend: `enabled`, `redis.url` |
| `errorLogChannel` | object | — | Error log forwarding to Fluxer channel (`enabled`, `channelId`, `forwardWarn`, `forwardInfo`, `startupMessage`) |
| `radio` | array | `[]` | Custom radio station definitions |
| `logging` | object | — | Per-category log toggles: `enabled`, `warn`, and 14 categories (`player`, `inactivity`, `aloneCheck`, `voiceState`, `voice247`, `voice`, `mediaplayer`, `commands`, `guild`, `recovery`, `settings`, `lavalink`, `dashboard`, `redis`) |
| `timers` | object | — | Timing values in ms: `inactivityTimeout`, `aloneCheckInterval`, `aloneCheckDebounce`, `rejoin247Delay`, `leave247RejoinDelay`, `playerUpdateInterval`, `searchSessionTimeout`, `playerSessionTimeout`, `intentionalLeaveTTL` |
| `sharding` | object | — | Sharding supervisor options (`totalShards`, `shardsPerProcess`, `respawn`, `spawnTimeout`, `spawnDelay`) |
| `fluxer.js` | object | — | Fluxer.js REST options (`timeout`, `retries`) |
| `lastfm` | `lf`, `lfm` | Main Last.fm hub | `%lastfm` |
| `lastfm link` | — | Link your Last.fm username | `%lastfm link your_user` |
| `lastfm love` | — | Love/unlove the currently playing track | `%lastfm love` |
| `lastfm whoknows` | `wk` | See who in the server listens to an artist | `%lastfm whoknows Queen` |
| `lastfm crowns` | — | View artist crown holders in the server | `%lastfm crowns` |
| `lastfm top` | — | View your top tracks, artists, or albums | `%lastfm top artists` |
| `lastfm lb` | — | View server-wide scrobble leaderboard | `%lastfm lb` |
---
### ⚙️ Server & Voice Settings
## Project Architecture
| Command | Aliases | Description | Example |
| :--- | :--- | :--- | :--- |
| `settings` | `247`, `prefix` | View or configure server preferences | `%settings get` |
| `join` | `connect` | Connect bot to your voice channel | `%join` |
| `leave` | `stop`, `disconnect` | Disconnect bot from voice | `%leave` |
| `forceleave` | `fl` | Force disconnect from any channel (Admin) | `%forceleave` |
| `radio` | `r` | Browse and play internet radio streams | `%radio list` |
| `lyrics` | `ly` | Search or display synced lyrics | `%lyrics` |
| `thumbnail` | `thumb` | View high-resolution track thumbnail | `%thumbnail` |
| `player` | — | Spawn interactive reaction controller | `%player` |
```
fluxer/
├── index.mjs # Entry point — creates the Remix instance, process-level
│ # error guards, and signal-based graceful shutdown
├── shard.mjs # OPTIONAL sharding supervisor (@fluxerjs/sharding) — forks
│ # one child process per shard slice, each running index.mjs
├── config_example.json # Configuration template
├── package.json
├── commands/ # 43 command entry files (one per command); the three
│ │ # largest (lastfm, settings, debug) are split into action-family
│ │ # modules inside commands/<name>/ subdirectories
│ ├── lastfm/ # lastfm action families (account, playback, listening,
│ │ # whoknows, info, tags, discovery, help, shared)
│ ├── settings/ # settings helpers (utils, channels247, setters)
│ └── debug/ # debug helpers (consts, gateway, rejoin, voiceDiagnostic)
├── settings/ # Settings system entry points (re-export, migrate, validators)
├── storage/ # Runtime data: defaults, modules.json, locales
├── docker/ # Docker self-hosting (Dockerfile, compose, entrypoint,
│ # config templates, .env.example)
└── src/
├── core/ # Bot composition
│ ├── Bot.mjs # Remix class — boot sequence, service wiring, alone-check,
│ │ # presence rotation, WebSocket error guards
│ ├── BotVoiceMixin.mjs # Voice-channel resolution, 24/7 player spawning with
│ │ # announcements, programmatic leave, shared servers
│ ├── Logger.mjs # Structured logger with per-category control
│ └── Locale.mjs # i18n translation engine
├── commands/ # Command framework layer
│ ├── index.mjs # Public surface (re-exports)
│ ├── CommandBuilder.mjs # Fluent builder + permission requirements
│ ├── Option.mjs # Typed options + flags with validation
│ ├── CommandHandler.mjs # Dispatcher: parsing, cooldowns, permission checks
│ ├── CommandLoader.mjs # Dynamic command loading + run-handler binding
│ ├── HelpHandler.mjs # Text help generation (usage/aliases/options)
│ └── PrefixManager.mjs # Per-guild prefix resolution
├── ui/ # Message/embed layer
│ ├── index.mjs # Public surface (re-exports)
│ ├── MessageHandler.mjs # Reply/send/edit embeds, reaction + message observers,
│ │ # permission checks, pagination entry
│ ├── Wrappers.mjs # Message & Channel wrappers
│ ├── Paginators.mjs # PageBuilder, RichPaginator (tabbed), QueuePaginator
│ ├── HelpCommand.mjs # Rich tabbed help command (Home/Music/Utilities/Support)
│ ├── Permissions.mjs # Required/critical/optional bot permission catalog
│ └── Embeds.mjs # Global embed color + message-shape helpers
├── voice/ # Gateway & voice-state layer
│ ├── VoiceStateCache.mjs # Dual LRU voice-state caches (humans / bots)
│ ├── VoiceStateResolver.mjs # Voice-state normalization + humans-in-channel check
│ └── gateway/
│ ├── index.mjs # Public surface
│ ├── GatewayHandler.mjs # Raw WS dispatch, presence rotation, boot recovery
│ ├── VoiceStateRouting.mjs # Voice-state update handling, inactivity triggers
│ ├── GuildSync.mjs # Guild seeding (cache + REST), guild delete
│ └── RejoinManager.mjs # 24/7 rejoin scheduling with retries
├── music/ # Player + audio engine layer
│ ├── PlayerManager.mjs # Player lifecycle & registry, getPlayer/initPlayer
│ ├── PlayerEventsMixin.mjs # Per-player event wiring, scrobbles, broadcasts
│ ├── PlayerLifecycleMixin.mjs# Voice checks, prompts, joins, leaves
│ ├── LavalinkManager.mjs # lavalink-client wrapper (NodeLink mode)
│ ├── probe.mjs # ffprobe wrapper for radio stream metadata
│ ├── providers.mjs # 45+ audio source provider definitions
│ ├── player/
│ │ ├── index.mjs # Public surface (default export: Player)
│ │ ├── Player.mjs # Core state machine: join/leave/destroy, controls, 24/7
│ │ ├── Queue.mjs # Queue data structure with loop modes + events
│ │ ├── PlaybackMixin.mjs # playNext pipeline, track-end timers, lyrics
│ │ ├── SearchMixin.mjs # Lavalink search, fallbacks, radio/external builders
│ │ └── DisplayMixin.mjs # Now-playing, queue listing, announcements
│ └── audio/
│ ├── index.mjs # Public surface
│ ├── FluxerAudioBridge.mjs # NodeLink streams → LiveKit publishing core
│ ├── StreamPipeline.mjs # Magic-byte sniffing, remux, Opus encode
│ ├── HttpStreams.mjs # Redirect-following HTTP JSON/stream helpers
│ └── WebMOpusMuxer.mjs # Streaming EBML/Matroska muxer (Opus → WebM)
├── services/ # Integrations
│ ├── FluxerListManager.mjs # FluxerList voters API client (TTL cache)
│ ├── TrackOptionsManager.mjs # Per-user per-track start/end times (MySQL + LRU)
│ └── lastfm/
│ ├── index.mjs # Public surface
│ ├── LastFmManager.mjs # Base: config, MySQL pool, shared helpers
│ ├── UserStoreMixin.mjs # Linking, sessions, scrobble opt-ins
│ ├── ScrobblingMixin.mjs # Scrobble + now-playing
│ ├── TrackQueriesMixin.mjs # Track/artist/album/tag/geo/chart queries
│ ├── UserQueriesMixin.mjs # User tops, charts, playlists, play categories
│ ├── ServerStatsMixin.mjs # Whoknows, crowns, leaderboards, affinity
│ ├── constants.mjs # Signed API-call plumbing
│ └── urlUtils.mjs # lastfm:// URL parsing
├── db/ # Persistence
│ ├── PoolManager.mjs # Unified MySQL pool manager (callback & promise APIs)
│ ├── Settings.mjs # SettingsManager / ServerSettings / RemoteSettingsManager
│ │ # (MySQL-backed, debounced JSON_SET writes)
│ └── DatabaseManager.mjs # mysql2 pool + parameterized queries + bcrypt helpers
├── utils/ # Cross-layer primitives (leaf layer)
│ ├── mixins.mjs # applyMixins — god-class splitting helper
│ ├── ShardingUtils.mjs # Shard-aware gateway helpers (2.2/3.0 compatible,
│ │ # guild→shard routing, local shard enumeration)
│ ├── Utils.mjs # Formatting, validation, ID cleaning
│ ├── API.mjs # REST call helpers (status/error wrapping)
│ ├── UI.mjs # Shared UI constants (colors)
│ └── Helpers247.mjs # 24/7 channel-mode helpers
└── dashboard/ # Dashboard backend
├── index.mjs # Public surface
├── Dashboard.mjs # Redis RPC routing, player/user broadcasts
├── RpcHandlersMixin.mjs# Request handlers + authorization checks
├── Serializers.mjs # Channel/user/player/command serializers (statics)
└── RedisHandler.mjs # Redis pub/sub RPC transport with reconnect handling
```
### 🛠️ Utilities & Diagnostics
---
## The Layered Codebase
The rewrite organises the codebase into strict layers with one-way dependencies
(no layer reaches *down* past another):
```
index.mjs
└── core/ ──────────────► composition root: wires every layer together
├── commands/ ─────► command framework (parsing, cooldowns, help)
│ └── ui/ ─────► message/embed primitives used by the framework
├── ui/ ──── message wrappers, paginators, permissions
├── voice/ ──── gateway events, voice-state caches, 24/7 rejoin
├── music/ ──── players, queue, audio engine, Lavalink client
├── services/ ──── Last.fm, FluxerList, track options
├── db/ ──── MySQL settings + dashboard database pool
└── dashboard/ ──── Redis-RPC backend
```
**God classes were eliminated.** The five largest modules (Player, PlayerManager,
GatewayHandler, FluxerAudioBridge, LastFmManager, Dashboard) are each split into a
small base class plus **concern mixins** — one file per responsibility, applied onto
the class at load time via `src/utils/mixins.mjs` (`applyMixins`). All methods keep
the same names, so callers (including your own command files and modules) are
unaffected.
**Big commands are grouped the same way.** The three commands that outgrew a
single file (`lastfm` 2.5k lines, `settings` 705, `debug` 669) keep their entry
file at `commands/<name>.mjs` (same path the loader, `%reload` and help system
reference) and move their implementation into `commands/<name>/` — one module per
action family, dispatched by the entry's `run()` via per-module action sets:
```js
// commands/lastfm.mjs (entry) — dispatch
if (ACCOUNT_ACTIONS.has(action))
return runAccountActions.call(this, msg, data, lastfm, prefix, userId, targetUserId, action);
```
The loader only reads top-level `*.mjs` files, so the subdirectories are invisible
to command discovery; case bodies and helpers were moved verbatim (verified by
per-command runtime parity harnesses under `scripts/`), and every entry file keeps
its original exports (`playLastFmCategory` is still importable from
`commands/lastfm.mjs`). `commands/player.mjs` intentionally stays single-file: it
is one cohesive interactive UI flow (a single 500-line `run()` closure) with no
seams that could be split without rewriting behavior.
**Public surfaces are barrels.** Each layer folder has an `index.mjs` that
re-exports its public API, so imports stay short and implementation files can move
without touching consumers:
```js
import { CommandBuilder } from "../src/commands/index.mjs";
import { Message, getGlobalColor } from "../src/ui/index.mjs";
import Player from "../src/music/player/index.mjs";
import { LastFmManager } from "../src/services/lastfm/index.mjs";
```
**Compatibility is drop-in:** `config.json` keys, the MySQL schema, the Redis RPC
protocol, command names/aliases, locale files, and the Docker entrypoint
(`node index.mjs` at the repository root) are all unchanged from the previous
single-layer layout.
---
## Localization
Remix supports multiple languages out of the box. The locale system loads JSON translation files from `storage/locales/bot/` and serves the appropriate language based on each guild's `locale` setting.
Currently supported languages:
| Code | Language |
| :--- | :--- |
| `en` | English (default) |
| `ar-SA` | Arabic |
| `de-DE` | German |
| `ckb` | Kurdish (Sorani) |
| `pt-BR` | Brazilian Portuguese |
| `tr` | Turkish |
To add a new language, place a JSON file in `storage/locales/bot/` following the same key structure as `en.json`, then set the locale per guild with `%settings set locale <code>`.
---
## npm Scripts
| Script | Command | Description |
| Command | Aliases | Description |
| :--- | :--- | :--- |
| `npm start` | `node index.mjs` | Start the bot (single process — default) |
| `npm run shard` | `node shard.mjs` | Start under the sharding supervisor (optional) |
| `npm run dev` | `node --inspect index.mjs --trace-warnings` | Start with Node.js inspector |
| `npm run migrate` | `node settings/migrate.mjs` | Clone/repair the remote settings table |
| `ping` | `latency` | View gateway latency and WebSocket round-trip |
| `stats` | `info`, `botinfo` | View bot uptime, RAM usage, active players, and servers |
| `invite` | `addbot` | Get bot invite link |
| `support` | `server` | Get official support community link |
| `vote` | — | View and support bot voters on FluxerList |
---
## Credits & License
## 🐳 Self-Hosting (Docker Setup)
**Development:**
- [ShadowLp174](https://github.com/ShadowLp174) — Lead developer
- [NoLogicAlan](https://github.com/NoLogicAlan) — Lead developer
- [Fantic](https://github.com/fanticwastaken) — Community Manager
The recommended way to run Remix is via Docker Compose. It bundles the bot, MySQL 8.4, Redis, and NodeLink into lightweight, automated containers.
**Powered by:**
- [`@fluxerjs/core`](https://github.com/fluxerjs/core) — Fluxer API client
- [`@fluxerjs/voice`](https://github.com/fluxerjs/voice) — LiveKit voice connections and playback
- [`lavalink-client`](https://www.npmjs.com/package/lavalink-client) — Lavalink/NodeLink client (search + streaming)
- [`NodeLink`](https://github.com/PerformanC/NodeLink) — Lavalink-compatible audio node
- [`prism-media`](https://github.com/discordjs/prism-media) — Opus encoding and stream demuxing
### 1. Clone & Configure
```bash
git clone https://github.com/remix-bot/fluxer.git
cd fluxer/docker
cp config_example.json config.json
cp .env.example .env
```
### 2. Edit Configuration
Open `docker/config.json` and insert your bot token:
```json
{
"token": "YOUR_FLUXER_BOT_TOKEN",
"prefix": "%",
"owners": ["YOUR_USER_ID"],
"mysql": {
"host": "mysql",
"port": 3306,
"user": "remix",
"password": "remix_pw",
"database": "remix"
},
"nodelink": {
"host": "nodelink",
"port": 3000,
"password": "youshallnotpass"
}
}
```
### 3. Start the Stack
```bash
docker compose up -d
```
### 4. Monitor Live Logs
```bash
docker compose logs -f bot
```
*To stop the stack:* `docker compose down`
*To update code and rebuild:* `docker compose up -d --build bot`
---
## 🏗️ Architecture
```
User (%play) ──► Command Handler ──► LavalinkManager (NodeLink Search)
│
▼
Queue Engine (History + Lossless Navigation)
│
▼
FluxerAudioBridge (In-Process Opus / WebM)
│
▼
LiveKit Voice Connection (@fluxerjs/voice)
```
* **Zero Re-Encode Pipeline:** Audio tracks from NodeLink stream as native WebM/Opus straight into LiveKit voice rooms.
* **In-Process Seeks:** Byte-level cluster/page seeking (`StreamPositioner`) eliminates FFmpeg subprocess requirements.
* **Safe HTTP Execution:** All direct stream URLs pass through DNS verification and private-network IP filters (`SafeHttp`) to prevent SSRF vulnerabilities.
---
## 🌍 Supported Languages
Remix automatically adapts to each server's configured locale (`%settings set locale <code>`):
| Code | Language | Native Name |
| :---: | :--- | :--- |
| `en` | English | English (Default) |
| `ar-SA` | Arabic | العربية |
| `ckb` | Kurdish (Sorani) | کوردیی ناوەندی |
| `tr` | Turkish | Türkçe |
| `de-DE` | German | Deutsch |
| `pt-BR` | Portuguese (Brazil) | Português Brasileiro |
---
## 👥 Credits & Team
* **[ShadowLp174](https://github.com/ShadowLp174)** — Lead Developer
* **[NoLogicAlan](https://github.com/NoLogicAlan)** — Lead Developer
* **[Fantic](https://github.com/fanticwastaken)** — Community Manager
**Core Libraries:**
* [`@fluxerjs/core`](https://github.com/fluxerjs/core) & [`@fluxerjs/voice`](https://github.com/fluxerjs/voice) — Fluxer API & LiveKit voice
* [`NodeLink`](https://github.com/PerformanC/NodeLink) — High-performance audio node
* [`lavalink-client`](https://www.npmjs.com/package/lavalink-client) — Audio client & search interface
---
<p align="center">
&copy; 2026 Remix. Code licensed under the <a href="LICENSE">MIT License</a>.<br>
&copy; 2026 Remix. Licensed under the <a href="LICENSE">MIT License</a>.<br>
<em>The Remix name, logo, and branding are proprietary and may not be reused.</em>
</p>
-1
View File
@@ -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";
/** @type {CommandBuilder} @description Command definition for the autoplay command. */
+8 -1
View File
@@ -9,6 +9,7 @@ import { getGlobalColor } from "../src/ui/index.mjs";
import { logger } from "../src/core/Logger.mjs";
import { inspect } from "node:util";
import { ERROR_COLOR, EMOJI_REMOVE_TIMEOUT } from "../src/utils/UI.mjs";
import { collectSecrets, redactSecrets } from "../src/utils/Redact.mjs";
/** @private @type {string[]} Property name substrings that indicate sensitive/secret data. */
const RESTRICTED = [
@@ -92,7 +93,7 @@ function removeSensitive(obj, level = 0, visited = new WeakSet()) {
* @param {*} value - The raw eval result.
* @returns {Promise<string>} The sanitized output string.
*/
async function clean(value) {
async function clean(value, config = null) {
if (value instanceof Promise) value = await value;
if (typeof value === "object" && value !== null) {
@@ -108,6 +109,12 @@ async function clean(value) {
output = `[Inspection Error]: ${err.message}`;
}
/* Mask all configured secret values */
if (config) {
const secrets = collectSecrets(config);
output = redactSecrets(output, secrets);
}
return output
.replace(/`/g, "`\u200b")
.replace(/@/g, "@\u200b") || "undefined";
+1 -1
View File
@@ -6,7 +6,7 @@
import { CommandBuilder } from "../src/commands/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
import { logger } from "../src/core/Logger.mjs";
import { getGlobalColor, cleanId } from "../src/ui/index.mjs";
import { cleanId } from "../src/ui/index.mjs";
/** @type {CommandBuilder} @description Command definition for the leave/stop command. */
export const command = new CommandBuilder()
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { CommandBuilder } from "../src/commands/index.mjs";
import { QueuePaginator, getGlobalColor } from "../src/ui/index.mjs";
import { QueuePaginator } from "../src/ui/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
const PAGE_SIZE = 10;
+2
View File
@@ -42,6 +42,8 @@ export async function run(message) {
}
p.pause();
p._autoPausedEmpty = false;
p._serverMutedAutoPaused = false;
const elapsed = p.getCurrentElapsedDuration();
const trackUrl = current.spotifyUrl || current.url || null;
const rawAuthor = current.artist || (typeof current.author === "object" ? current.author?.name : current.author);
+66
View File
@@ -0,0 +1,66 @@
/**
* @module commands/previous
* @description Play the previous track from recent playback history (supports %prev, %back, %undo).
*/
import { CommandBuilder } from "../src/commands/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
import { Utils } from "../src/utils/Utils.mjs";
/** @type {CommandBuilder} @description Command definition for the previous command. */
export const command = new CommandBuilder()
.setName("previous")
.setDescription("Play the previous track from playback history.", "commands.previous")
.addAliases("prev", "back", "undo")
.setCategory("music");
/**
* @async
* Run handler for the previous command.
* Steps backward into the queue's circular playback history.
* @param {object} message - The command message wrapper.
* @returns {Promise<void>}
*/
export async function run(message) {
const p = await this.getPlayer(message, true, true, false);
if (!p) return;
if (!p.queue?.history?.length) {
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setDescription(this.t(message, "responses.previous.noHistory"));
return message.reply({ embeds: [embed] });
}
const prevSong = await p.playPrevious();
if (!prevSong) {
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setDescription(this.t(message, "responses.previous.failed"));
return message.reply({ embeds: [embed] });
}
const titleDisplay = prevSong.title ? Utils.truncate(prevSong.title, 50) : this.t(message, "responses.play.unknownTrack");
const trackLink = prevSong.spotifyUrl || prevSong.url || "";
const rawAuthor = prevSong.artist || (typeof prevSong.author === "object" ? prevSong.author?.name : prevSong.author);
const thumb = prevSong.thumbnail || null;
const historyRemaining = p.queue.history.length;
let desc = trackLink ? `**[${titleDisplay}](${trackLink})**` : `**${titleDisplay}**`;
if (rawAuthor) {
desc += `\n${this.t(message, "responses.play.byAuthor", { author: rawAuthor })}`;
}
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({ name: `⏮️ ${this.t(message, "responses.previous.author")}` })
.setTitle(this.t(message, "responses.previous.title"))
.setDescription(desc)
.setFooter({ text: this.t(message, "responses.previous.footer", { count: historyRemaining }) });
if (thumb) {
embed.setThumbnail(thumb);
}
return message.reply({ embeds: [embed] });
}
+75
View File
@@ -0,0 +1,75 @@
/**
* @module commands/replay
* @description Restart the currently playing track from the beginning without re-fetching from source.
*/
import { CommandBuilder } from "../src/commands/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
import { Utils } from "../src/utils/Utils.mjs";
/** @type {CommandBuilder} @description Command definition for the replay command. */
export const command = new CommandBuilder()
.setName("replay")
.setDescription("Restart the current song from the beginning.", "commands.replay")
.addAliases("restart")
.setCategory("music");
/**
* @async
* Run handler for the replay command.
* Seeks the player back to 0:00.
* @param {object} message - The command message wrapper.
* @returns {Promise<void>}
*/
export async function run(message) {
const p = await this.getPlayer(message, true, true, false);
if (!p) return;
const current = p.queue?.getCurrent();
if (!current) {
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setDescription(this.t(message, "responses.replay.nothingPlaying"));
return message.reply({ embeds: [embed] });
}
if (current.type === "radio" || current.isLive) {
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setDescription(this.t(message, "responses.replay.live"));
return message.reply({ embeds: [embed] });
}
const success = await p.seekToPosition(0);
if (!success) {
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setDescription(this.t(message, "responses.replay.failed"));
return message.reply({ embeds: [embed] });
}
const titleDisplay = current.title ? Utils.truncate(current.title, 50) : this.t(message, "responses.play.unknownTrack");
const trackLink = current.spotifyUrl || current.url || "";
const rawAuthor = current.artist || (typeof current.author === "object" ? current.author?.name : current.author);
const thumb = current.thumbnail || null;
const trackDuration = p._getTrackDurationMs(current);
const totalStr = trackDuration > 0 ? Utils.prettifyMS(trackDuration) : null;
let desc = trackLink ? `**[${titleDisplay}](${trackLink})**` : `**${titleDisplay}**`;
if (rawAuthor) {
desc += `\n${this.t(message, "responses.play.byAuthor", { author: rawAuthor })}`;
}
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({ name: `🔄 ${this.t(message, "responses.replay.author")}` })
.setTitle(this.t(message, "responses.replay.title"))
.setDescription(desc)
.setFooter({ text: totalStr ? this.t(message, "responses.replay.footer", { duration: totalStr }) : "Remix Music • Restarted from 0:00" });
if (thumb) {
embed.setThumbnail(thumb);
}
return message.reply({ embeds: [embed] });
}
+2
View File
@@ -45,6 +45,8 @@ export async function run(message) {
}
p.resume();
p._autoPausedEmpty = false;
p._serverMutedAutoPaused = false;
const elapsed = p.getCurrentElapsedDuration();
const trackUrl = current.spotifyUrl || current.url || null;
const rawAuthor = current.artist || (typeof current.author === "object" ? current.author?.name : current.author);
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { CommandBuilder } from "../src/commands/index.mjs";
import { Message, getGlobalColor } from "../src/ui/index.mjs";
import { Message } from "../src/ui/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
import { PROVIDER_CHOICES, PROVIDER_NAMES, parseInlineProvider } from "../src/music/providers.mjs";
import { NUMBER_EMOJIS, CANCEL_EMOJI } from "../src/utils/UI.mjs";
+3 -3
View File
@@ -10,12 +10,12 @@ import { cleanId, getMessageGuildId, getGlobalColor } from "../../src/ui/index.m
import { EmbedBuilder } from "@fluxerjs/core";
import runnables from "../../settings/runnables.mjs";
import {
parseBool, displayValue, getGuildName, embed, tWrap, prettifySettingLabel,
BOOL_SETTINGS, VALID_LOCALES, VOLUME_MIN, VOLUME_MAX, PREFIX_MAX, SHORTCUTS,
parseBool, displayValue, embed, tWrap, prettifySettingLabel,
BOOL_SETTINGS, VALID_LOCALES, VOLUME_MIN, VOLUME_MAX, PREFIX_MAX,
VOTE_SKIP_THRESHOLD_MIN, VOTE_SKIP_THRESHOLD_MAX,
} from "./utils.mjs";
import {
get247Channels, save247Channels, build247Panel, disable247, handle247Toggle,
save247Channels, disable247, handle247Toggle,
} from "./channels247.mjs";
/**
+80
View File
@@ -0,0 +1,80 @@
/**
* @module commands/skipto
* @description Skip directly to a specific track position in the queue.
*/
import { CommandBuilder } from "../src/commands/index.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
import { Utils } from "../src/utils/Utils.mjs";
/** @type {CommandBuilder} @description Command definition for the skipto command. */
export const command = new CommandBuilder()
.setName("skipto")
.setDescription("Skip directly to a specific track in the queue.", "commands.skipto")
.addAliases("jump", "jumpto")
.setCategory("music")
.addNumberOption(opt =>
opt.setName("position")
.setDescription("The track number in the queue to jump to.", "options.skipto.position")
.setRequired(true)
);
/**
* @async
* Run handler for the skipto command.
* Skips all tracks prior to the target position and advances playback immediately.
* @param {object} message - The command message wrapper.
* @param {object} data - Parsed command data containing the position option.
* @returns {Promise<void>}
*/
export async function run(message, data) {
const p = await this.getPlayer(message, true, true, false);
if (!p) return;
const queueSize = p.queue?.size() ?? 0;
if (queueSize === 0) {
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setDescription(this.t(message, "responses.skipto.emptyQueue"));
return message.reply({ embeds: [embed] });
}
const rawPosition = data.get("position")?.value;
const position = parseInt(rawPosition, 10);
if (isNaN(position) || position < 1 || position > queueSize) {
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setDescription(this.t(message, "responses.skipto.invalidPosition", { max: queueSize }));
return message.reply({ embeds: [embed] });
}
/* Preview targeted track before splicing */
const targetTrack = p.queue.data[position - 1];
const skippedCount = position;
p.skipTo(position);
const titleDisplay = targetTrack?.title ? Utils.truncate(targetTrack.title, 50) : this.t(message, "responses.play.unknownTrack");
const trackLink = targetTrack?.spotifyUrl || targetTrack?.url || "";
const rawAuthor = targetTrack?.artist || (typeof targetTrack?.author === "object" ? targetTrack.author?.name : targetTrack?.author);
const remainingInQueue = Math.max(0, queueSize - position);
let desc = trackLink ? `**[${titleDisplay}](${trackLink})**` : `**${titleDisplay}**`;
if (rawAuthor) {
desc += `\n${this.t(message, "responses.play.byAuthor", { author: rawAuthor })}`;
}
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({ name: `⏭️ ${this.t(message, "responses.skipto.author")}` })
.setTitle(this.t(message, "responses.skipto.title", { position, count: skippedCount }))
.setDescription(desc)
.setFooter({ text: this.t(message, "responses.skipto.footer", { remaining: remainingInQueue }) });
if (targetTrack?.thumbnail) {
embed.setThumbnail(targetTrack.thumbnail);
}
return message.reply({ embeds: [embed] });
}
+8 -10
View File
@@ -62,24 +62,22 @@ services:
- remix-net
nodelink:
image: node:22-bookworm-slim
image: ghcr.io/performanc/nodelink:latest
container_name: remix-nodelink
restart: unless-stopped
working_dir: /nodelink
command: sh -c "if [ ! -f package.json ]; then npm init -y && npm install @performanc/nodelink; fi; node node_modules/@performanc/nodelink/index.js || node index.js"
environment:
- TZ=${TZ:-UTC}
volumes:
- nodelink_data:/nodelink
- ./nodelink.config.json:/nodelink/config.json:ro
- nodelink_data:/app/.cache
- ./nodelink.config.json:/app/config.json:ro
ports:
- "${NODELINK_PORT:-3000}:3000"
healthcheck:
test: ["CMD", "node", "-e", "require('net').connect(3000,'127.0.0.1').on('connect',function(){process.exit(0)}).on('error',function(){process.exit(1)})"]
interval: 5s
timeout: 3s
retries: 30
start_period: 60s
test: ["CMD-SHELL", "node -e \"require('net').connect(3000,'127.0.0.1').on('connect',function(){process.exit(0)}).on('error',function(){process.exit(1)})\""]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
networks:
- remix-net
-5
View File
@@ -11,14 +11,9 @@
* conversion helpers in Serializers.mjs — both are attached at the bottom of this file.
*/
import { CommandBuilder, CommandHandler, Option } from "../commands/index.mjs";
import { PermissionFlags } from "@fluxerjs/core";
import Player from "../music/player/index.mjs";
import { Utils, cleanId } from "../utils/Utils.mjs";
import { DatabaseManager } from "../db/DatabaseManager.mjs";
import { RedisHandler } from "./RedisHandler.mjs";
import { logger } from "../core/Logger.mjs";
import { iterateVoiceStates } from "../voice/VoiceStateResolver.mjs";
import { applyMixins } from "../utils/mixins.mjs";
import RpcHandlersMixin from "./RpcHandlersMixin.mjs";
import Serializers from "./Serializers.mjs";
+1 -3
View File
@@ -5,9 +5,7 @@
*/
import { compare, genSalt, hash } from "bcryptjs";
import { createPool } from "mysql2/promise";
import { logger } from "../core/Logger.mjs";
import { MYSQL_POOL_DEFAULTS, attachMysqlPoolGuard } from "./MysqlGuard.mjs";
import { attachMysqlPoolGuard } from "./MysqlGuard.mjs";
import { getSharedPromisePool } from "./PoolManager.mjs";
/**
+1 -1
View File
@@ -8,7 +8,7 @@
import fs from "node:fs";
import mysql from "mysql2";
import { EventEmitter } from "node:events";
import { MYSQL_POOL_DEFAULTS, attachMysqlPoolGuard } from "./MysqlGuard.mjs";
import { attachMysqlPoolGuard } from "./MysqlGuard.mjs";
import { getSharedMysqlPool } from "./PoolManager.mjs";
import { logger } from "../core/Logger.mjs";
+6
View File
@@ -73,14 +73,17 @@ export class LavalinkManager extends EventEmitter {
nodeMgr.on("connect", (node) => {
this._nodeConnected = true;
logger.lavalink("[Lavalink] Node connected (nodeManager): " + node.id);
this.emit("nodeConnect", node);
});
nodeMgr.on("disconnect", (node, reason) => {
this._nodeConnected = false;
logger.warn("[Lavalink] Node disconnected (nodeManager):", node?.id, reason);
this.emit("nodeDisconnect", node, reason);
});
nodeMgr.on("reconnect", (node) => {
this._nodeConnected = true;
logger.lavalink("[Lavalink] Node reconnecting (nodeManager): " + node.id);
this.emit("nodeReconnect", node);
});
} catch (e) {
logger.warn("[Lavalink] nodeManager event setup error:", e?.message);
@@ -92,16 +95,19 @@ export class LavalinkManager extends EventEmitter {
this.lavalink.on("nodeConnect", (node) => {
this._nodeConnected = true;
logger.lavalink("[Lavalink] Node connected (manager): " + node.id);
this.emit("nodeConnect", node);
});
this.lavalink.on("nodeReconnect", (node) => {
this._nodeConnected = true;
logger.lavalink("[Lavalink] Node reconnecting (manager): " + node.id);
this.emit("nodeReconnect", node);
});
this.lavalink.on("nodeDisconnect", (node, reason) => {
this._nodeConnected = false;
logger.warn("[Lavalink] Node disconnected (manager):", node.id, reason);
this.emit("nodeDisconnect", node, reason);
});
this.lavalink.on("nodeError", (node, err) => {
+1 -1
View File
@@ -12,7 +12,7 @@
*/
import Player from "./player/index.mjs";
import { Utils, cleanId } from "../utils/Utils.mjs";
import { cleanId } from "../utils/Utils.mjs";
import { logger } from "../core/Logger.mjs";
import { getMessageGuildId } from "../ui/index.mjs";
import { applyMixins } from "../utils/mixins.mjs";
+25 -14
View File
@@ -163,16 +163,13 @@ export class FluxerAudioBridge extends EventEmitter {
// this point get the explicit error below instead of fetching their
// source page.
if (!trackInfo.encoded && trackInfo.url && trackInfo.url.startsWith("http")) {
logger.player("[AudioBridge] Route 3: Fetching directly: " + trackInfo.url.substring(0, 80) + "...");
const response = await fetch(trackInfo.url, {
logger.player("[AudioBridge] Route 3: Fetching directly via SafeHttp: " + trackInfo.url.substring(0, 80) + "...");
const { openPublicStream } = await import("./SafeHttp.mjs");
const { stream, req } = await openPublicStream(trackInfo.url, {
headers: { "User-Agent": "Mozilla/5.0 (compatible; Bot/1.0)" },
redirect: "follow",
});
if (!response.ok) {
throw new Error("HTTP " + response.status + " for " + trackInfo.url);
}
const stream = Readable.fromWeb(response.body);
this._sourceStream = stream;
this._sourceReq = req || null;
const routed = await this._routeByMagic(stream);
if (routed.kind === "webm") {
@@ -330,6 +327,11 @@ export class FluxerAudioBridge extends EventEmitter {
streamToPlay = remuxed;
}
this._stream = streamToPlay;
await this._awaitPendingUnpublishes(conn);
if (generation !== this._playGeneration) {
streamToPlay?.destroy?.();
return "stopped";
}
await conn.play(streamToPlay);
} catch (e) {
if (generation !== this._playGeneration) return "stopped";
@@ -457,7 +459,9 @@ export class FluxerAudioBridge extends EventEmitter {
}
return await this._playOpened(conn, opened, durationMs, generation);
}
// Zero-copy: the voice connection fetches the URL itself.
/* Zero-copy: ensure prior unpublish settled before publishing */
await this._awaitPendingUnpublishes(conn);
if (stale()) return "stopped";
await conn.play(direct.url);
} catch (e) {
if (stale()) return "stopped";
@@ -508,14 +512,12 @@ export class FluxerAudioBridge extends EventEmitter {
try {
const room = conn?.room;
const participant = room?.localParticipant;
if (!room?.isConnected || typeof participant?.unpublishTrack !== "function") return;
if (!room?.isConnected || !participant || typeof participant.unpublishTrack !== "function") return;
const publications = participant.trackPublications;
if (!publications || typeof publications.entries !== "function") return;
// One guard map per participant, shared by every bridge instance in this
// process: a SID currently being unpublished is skipped by later sweeps,
// and its promise is awaitable via _awaitPendingUnpublishes().
/* One guard map per participant, shared by every bridge instance in this process */
let pending = pendingUnpublishSids.get(participant);
if (!pending) {
pending = new Map();
@@ -528,11 +530,20 @@ export class FluxerAudioBridge extends EventEmitter {
if (pending.has(sid)) continue;
try {
const settle = Promise.resolve(participant.unpublishTrack(sid, true))
.catch(() => {}) // failed unpublish is still a settled state — don't block on it
.catch((err) => {
/* Suppress benign race-condition errors during rapid track skips */
if (!err || /Publication not found|AudioSource is closed|Participant not found|Track not found/i.test(err?.message || '')) {
return;
}
logger.warn?.("[AudioBridge] unpublishTrack warning: " + err.message);
})
.finally(() => { if (pending.get(sid) === settle) pending.delete(sid); });
pending.set(sid, settle);
logger.player("[AudioBridge] Unpublished stale audio track: " + sid);
} catch (_) {
} catch (err) {
if (!err || /Publication not found|AudioSource is closed|Participant not found|Track not found/i.test(err?.message || '')) {
/* Benign race condition */
}
pending.delete(sid);
}
}
+24 -5
View File
@@ -9,13 +9,10 @@
*/
import { EmbedBuilder } from "@fluxerjs/core";
import { getGlobalColor } from "../../ui/index.mjs";
import { ERROR_COLOR } from "../../utils/UI.mjs";
import { Utils, cleanId } from "../../utils/Utils.mjs";
import { logger } from "../../core/Logger.mjs";
import meta from "../probe.mjs";
import { getBilibiliStreamUrl } from "../bilibili/index.mjs";
import { isLoadstreamEnabled } from "../audio/AudioSettings.mjs";
/**
* @type {object}
@@ -110,6 +107,28 @@ const PlaybackMixin = {
finally { if (generation === this._playNextGeneration) this._playingNext = false; }
},
/**
* @async Step backward to the previous track in history.
* Restores the current track to the top of the queue and plays the previous track.
* @this {import('./Player.mjs').Player}
* @returns {Promise<object|null>} The previous track or null if history is empty.
*/
async playPrevious() {
if (!this.queue || this.queue.history.length === 0) return null;
this._skipping = true;
this._bridgeStop();
const prevSong = this.queue.previous();
if (!prevSong) {
this._skipping = false;
return null;
}
this._playingNext = false;
this._radioAnnounced = false;
await this.playNext({ reuseCurrent: true });
this._skipping = false;
return prevSong;
},
/**
* @private @async Core logic for advancing to the next track: resolves
* track options, announces, starts playback via the bridge, arms the
@@ -121,8 +140,8 @@ const PlaybackMixin = {
this._bridgeStop();
const currentBeforeNext = this.queue.getCurrent();
if (currentBeforeNext) this._lastPlayedTrack = currentBeforeNext;
const songData = this.queue.next(opts);
if (currentBeforeNext && !opts.reuseCurrent) this._lastPlayedTrack = currentBeforeNext;
const songData = opts.reuseCurrent ? this.queue.getCurrent() : this.queue.next(opts);
if (!songData) {
this.emit("stopplay");
this.emit("queueEnd");
+5 -6
View File
@@ -11,8 +11,7 @@ import { getVoiceManager } from "@fluxerjs/voice";
import { EventEmitter } from "node:events";
import http from "node:http";
import https from "node:https";
import { EmbedBuilder, PermissionFlags } from "@fluxerjs/core";
import { getGlobalColor } from "../../ui/index.mjs";
import { PermissionFlags } from "@fluxerjs/core";
import { Utils, cleanId } from "../../utils/Utils.mjs";
import { logger } from "../../core/Logger.mjs";
import { get247ChannelMode, detachPlayerFromManager } from "../../utils/Helpers247.mjs";
@@ -827,9 +826,9 @@ class Player extends EventEmitter {
async resumePlaybackAfterNodeReconnect() {
if (this._destroyed || this.leaving || !this._voiceConn) return false;
const current = this.queue?.getCurrent();
if (!current || !this._audioBridge?.playing) return false;
if (!current || this._paused) return false;
const posMs = this.computePosition();
const posMs = Math.max(0, this.computePosition());
logger.player(`[Player:${this._guildId}] Node reconnected — resuming "${current.title}" at ${Math.round(posMs / 1000)}s`);
try {
@@ -1061,8 +1060,8 @@ class Player extends EventEmitter {
/** @private Stop the audio bridge if currently playing. */
_bridgeStop() {
if (this._audioBridge?.playing) {
this._audioBridge.stop();
if (this._audioBridge) {
try { this._audioBridge.stop(); } catch (_) {}
}
}
+52 -2
View File
@@ -26,6 +26,10 @@ export class Queue extends EventEmitter {
loop = false;
/** @type {boolean} Whether single-song loop is enabled. */
songLoop = false;
/** @type {Array<object>} Circular buffer of recently played tracks. */
history = [];
/** @type {number} Maximum number of tracks preserved in playback history. */
static MAX_HISTORY = 20;
/** Initialize an empty queue with no loop enabled. */
constructor() {
@@ -50,6 +54,13 @@ export class Queue extends EventEmitter {
if (!ignoreSongLoop && this.songLoop && this.current) return this.current;
if (this.loop && this.current) this.data.push(this.current);
if (previous && (!this.songLoop || ignoreSongLoop)) {
this.history.push(previous);
if (this.history.length > Queue.MAX_HISTORY) {
this.history.shift();
}
}
if (this.isEmpty()) {
this.current = null;
return null;
@@ -143,10 +154,49 @@ export class Queue extends EventEmitter {
return count;
}
/**
* Step backward to the previous track from history.
* Restores the current track to the front of the queue so it is not lost.
* @returns {object|null} The restored previous track, or null if history is empty.
*/
previous() {
if (this.history.length === 0) return null;
const prevTrack = this.history.pop();
if (this.current) {
this.data.unshift(this.current);
}
const old = this.current;
this.current = prevTrack;
this.emit("queue", {
type: "update",
data: { current: this.current, old, restored: true, loop: this.loop }
});
return this.current;
}
/** @returns {Array<object>} Copy of recent playback history. */
getHistory() { return this.history.slice(); }
/**
* Remove all tracks before target index (0-based) and return the skipped tracks.
* @param {number} targetIndex - 0-based index of track to jump to.
* @returns {Array<object>} Array of skipped tracks.
*/
skipTo(targetIndex) {
if (targetIndex <= 0) return [];
const count = Math.min(targetIndex, this.data.length);
const skipped = this.data.splice(0, count);
this.emit("queue", {
type: "skipTo",
data: { targetIndex, skipped, remaining: this.data.length }
});
return skipped;
}
/** Remove all tracks from the queue. */
clear() { this.data.length = 0; }
/** Clear the queue and reset all state (current, loops). */
reset() { this.clear(); this.current = null; this.songLoop = false; this.loop = false; }
/** Clear the queue and reset all state (current, loops, history). */
reset() { this.clear(); this.current = null; this.songLoop = false; this.loop = false; this.history.length = 0; }
/** @param {boolean} bool - Enable or disable song loop. */
setSongLoop(bool) { this.songLoop = bool; }
+1 -2
View File
@@ -1,7 +1,6 @@
/** @module src/services/TrackOptionsManager @description Per-user track options (start/end timestamps) stored in MySQL. Provides caching, matching, and CRUD for track segments. */
import mysql from "mysql2";
import { logger } from "../core/Logger.mjs";
import { MYSQL_POOL_DEFAULTS, attachMysqlPoolGuard } from "../db/MysqlGuard.mjs";
import { attachMysqlPoolGuard } from "../db/MysqlGuard.mjs";
import { getSharedMysqlPool } from "../db/PoolManager.mjs";
const DEFAULT_ALIAS = "default";
+1 -1
View File
@@ -14,7 +14,7 @@ import { logger } from "../../core/Logger.mjs";
import { normalizeTrackText } from "./constants.mjs";
import { applyMixins } from "../../utils/mixins.mjs";
import { parseLastFmUrl, isLastFmUrl } from "./urlUtils.mjs";
import { MYSQL_POOL_DEFAULTS, attachMysqlPoolGuard } from "../../db/MysqlGuard.mjs";
import { attachMysqlPoolGuard } from "../../db/MysqlGuard.mjs";
import { getSharedPromisePool } from "../../db/PoolManager.mjs";
import UserStoreMixin from "./UserStoreMixin.mjs";
import ScrobblingMixin from "./ScrobblingMixin.mjs";
+1 -2
View File
@@ -1,7 +1,6 @@
/** @module src/utils/Utils @description General-purpose utility functions for formatting, validation, string manipulation, and ID cleaning. */
import { escapeMarkdown as _escapeMarkdown, truncate as _truncate } from "@fluxerjs/util";
import { logger } from "../core/Logger.mjs";
import { escapeMarkdown as _escapeMarkdown } from "@fluxerjs/util";
/**
* Strip all non-digit characters from a value to extract a Snowflake/numeric ID.
-1
View File
@@ -1,6 +1,5 @@
/** @module src/voice/VoiceStateCache */
import { logger } from "../core/Logger.mjs";
import { cleanId } from "../utils/Utils.mjs";
/**
+2 -2
View File
@@ -10,10 +10,10 @@
import { Events, GatewayOpcodes } from "@fluxerjs/core";
import { logger, _wsErrorCooldown } from "../../core/Logger.mjs";
import { ServerSettings } from "../../db/Settings.mjs";
import { get247ChannelMode, remove247ChannelMode } from "../../utils/Helpers247.mjs";
import { get247ChannelMode } from "../../utils/Helpers247.mjs";
import { cleanId } from "../../utils/Utils.mjs";
import * as ShardingUtils from "../../utils/ShardingUtils.mjs";
import { iterateVoiceStates, hasHumansInChannel, getChannelsWithHumans, resolveIsBotUser } from "../VoiceStateResolver.mjs";
import { iterateVoiceStates, resolveIsBotUser } from "../VoiceStateResolver.mjs";
import { applyMixins } from "../../utils/mixins.mjs";
import VoiceStateRouting from "./VoiceStateRouting.mjs";
import GuildSync from "./GuildSync.mjs";
+53
View File
@@ -15,6 +15,7 @@ import { get247ChannelMode, isPlayerConnectionDead } from "../../utils/Helpers24
import { VoiceStateCache } from "../VoiceStateCache.mjs";
import { resolveIsBotUser } from "../VoiceStateResolver.mjs";
import { cleanId } from "../../utils/Utils.mjs";
import { EmbedBuilder } from "@fluxerjs/core";
/**
* @type {object}
@@ -60,6 +61,40 @@ const VoiceStateRouting = {
const isBotUser = isBot === true && userId === client.user?.id;
/* Handle server-mute (admin / community mute) on the bot */
if (isBotUser && player) {
const isMuted = data?.mute === true || data?.suppress === true;
if (isMuted && !player._serverMuted) {
player._serverMuted = true;
if (player._audioBridge?.playing && !player._paused) {
player._serverMutedAutoPaused = true;
player.pause();
logger.player(`[Player:${player._guildId}] Bot was server-muted by an admin — pausing playback`);
const muteEmbed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({ name: player._t?.("responses.play.serverMutedAuthor") ?? "🔇 Bot Muted by Server" })
.setTitle(player._t?.("responses.play.serverMutedTitle") ?? "Playback Paused")
.setDescription(player._t?.("responses.play.serverMutedDesc") ?? "The bot was muted by a server administrator. Playback is paused to preserve track position.")
.setFooter({ text: "Remix Music • Will auto-resume when unmuted" });
player.emit("message", { embeds: [muteEmbed] });
}
} else if (!isMuted && player._serverMuted) {
player._serverMuted = false;
if (player._serverMutedAutoPaused && player._paused) {
player._serverMutedAutoPaused = false;
player.resume();
logger.player(`[Player:${player._guildId}] Bot was server-unmuted — resuming playback`);
const unmuteEmbed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({ name: player._t?.("responses.play.serverUnmutedAuthor") ?? "🔊 Bot Unmuted" })
.setTitle(player._t?.("responses.play.serverUnmutedTitle") ?? "Playback Resumed")
.setDescription(player._t?.("responses.play.serverUnmutedDesc") ?? "The bot was unmuted — automatically resuming playback.")
.setFooter({ text: "Remix Music • Auto-Resumed" });
player.emit("message", { embeds: [unmuteEmbed] });
}
}
}
if (!isBotUser) {
this._handleInactivityOnVoiceChange(player, playerGuildId, homeChannelId, userId, oldChannelId, newChannelId, vsuGuildId, data);
@@ -211,6 +246,12 @@ const VoiceStateRouting = {
setTimeout(() => {
if (!oldPlayer._hasHumansInChannel()) {
logger.voiceState(`[VoiceState] Last human left ${cleanOld}, starting inactivity timer`);
/* Smart Auto-Pause: pause if playing to conserve bandwidth & hold position */
if (oldPlayer._audioBridge?.playing && !oldPlayer._paused) {
oldPlayer._autoPausedEmpty = true;
oldPlayer.pause();
logger.player(`[Player:${oldPlayer._guildId}] Auto-paused playback because voice channel is empty`);
}
oldPlayer._startInactivityTimer();
}
}, this.T.aloneCheckDebounce);
@@ -225,6 +266,18 @@ const VoiceStateRouting = {
if (newPlayer && typeof newPlayer._stopInactivityTimer === "function") {
logger.voiceState(`[VoiceState] Human joined ${cleanChId}, stopping inactivity timer`);
newPlayer._stopInactivityTimer();
/* Smart Auto-Resume: resume if was paused because channel was empty */
if (newPlayer._autoPausedEmpty && newPlayer._paused) {
newPlayer._autoPausedEmpty = false;
newPlayer.resume();
logger.player(`[Player:${newPlayer._guildId}] Human joined ${cleanChId} — auto-resuming playback`);
const resumeEmbed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({ name: newPlayer._t?.("responses.play.autoResumeAuthor") ?? "▶️ Voice Channel Active" })
.setDescription(newPlayer._t?.("responses.play.autoResumeDesc") ?? "Listener joined the voice channel — automatically resuming playback.")
.setFooter({ text: "Remix Music • Auto-Pause & Resume" });
newPlayer.emit("message", { embeds: [resumeEmbed] });
}
}
} catch(e) { logger.warn("[VoiceState] Inactivity timer stop failed:", e?.message); }
}
+39 -2
View File
@@ -88,7 +88,10 @@
"normalize": "تبديل تسوية الصوت الديناميكية (مستوى ReplayGain) عبر منصات الموسيقى المختلفة.",
"bassboost": "تطبيق تأثير معادل تضخيم الباس بمستويات منخفضة، متوسطة أو قوية.",
"speed": "تعديل سرعة تشغيل المقطع الصوتي الحالي (0.5× إلى 2.0×).",
"pitch": "تعديل طبقة الصوت (النغمة) للمقطع الصوتي الحالي (0.5× إلى 2.0×)."
"pitch": "تعديل طبقة الصوت (النغمة) للمقطع الصوتي الحالي (0.5× إلى 2.0×).",
"previous": "تشغيل الأغنية السابقة من سجل التشغيل.",
"replay": "إعادة تشغيل الأغنية الحالية من البداية.",
"skipto": "التخطي مباشرة إلى أغنية معينة في قائمة الانتظار."
},
"options": {
"debug": {
@@ -184,6 +187,9 @@
},
"lyrics": {
"query": "عنوان الأغنية والفنان للبحث عن الكلمات (اختياري)."
},
"skipto": {
"position": "رقم الأغنية في قائمة الانتظار للانتقال إليها."
}
},
"pagination": {
@@ -510,7 +516,15 @@
"playbackErrorAuthor": "🎵 حارس بث التشغيل",
"streamUnavailableTitle": "البث غير متوفر",
"streamErrorTitle": "انقطع بث التشغيل",
"streamErrorFooter": "التخطي إلى المسار التالي • {{prefix}}play لإضافة المزيد من الأغاني"
"streamErrorFooter": "التخطي إلى المسار التالي • {{prefix}}play لإضافة المزيد من الأغاني",
"autoResumeAuthor": "▶️ القناة الصوتية نشطة",
"autoResumeDesc": "انضم مستمع إلى القناة الصوتية — استئناف التشغيل تلقائياً.",
"serverMutedAuthor": "🔇 تم كتم البوت من السيرفر",
"serverMutedTitle": "تم إيقاف التشغيل مؤقتاً",
"serverMutedDesc": "تم كتم البوت بواسطة مسؤول السيرفر. تم إيقاف التشغيل مؤقتاً للحفاظ على موضع الأغنية.",
"serverUnmutedAuthor": "🔊 تم إلغاء كتم البوت",
"serverUnmutedTitle": "تم استئناف التشغيل",
"serverUnmutedDesc": "تم إلغاء كتم البوت — استئناف التشغيل تلقائياً."
},
"playnext": {
"searching": "🔍 جارٍ البحث...",
@@ -1226,6 +1240,29 @@
"reorderedDesc": "تم النقل من المركز **#{{from}}** ➔ **#{{to}}** في قائمة الانتظار.",
"nowPlayingNext": "سيعمل الآن كالمسار التالي بعد الأغنية الحالية • {{prefix}}np",
"viewUpdatedQueue": "{{prefix}}list لعرض قائمة الانتظار المحدثة"
},
"previous": {
"noHistory": "لا توجد أغنية سابقة في سجل التشغيل.",
"failed": "تعذر تشغيل الأغنية السابقة.",
"author": "سجل التشغيل • الأغنية السابقة",
"title": "تمت استعادة الأغنية السابقة",
"footer": "سجل التشغيل • متبقي {{count}} أغنية سابقة"
},
"replay": {
"nothingPlaying": "لا يوجد شيء قيد التشغيل حالياً!",
"live": "لا يمكن إعادة تشغيل البث المباشر أو محطات الراديو.",
"failed": "تعذر إعادة تشغيل الأغنية.",
"author": "إعادة التشغيل • 0:00",
"title": "تمت إعادة تشغيل الأغنية من البداية",
"footer": "Remix Music • تشغيل من البداية (المدة: {{duration}})"
},
"skipto": {
"emptyQueue": "قائمة الانتظار فارغة! لا توجد أغانٍ قادمة للانتقال إليها.",
"invalidPosition": "رقم غير صالح! يرجى إدخال رقم بين 1 و {{max}}.",
"failed": "تعذر الانتقال إلى الأغنية المحددة.",
"author": "التنقل في القائمة • تخطي الأغاني",
"title": "تم تخطي {{count}} مسار(مسارات) — الانتقال إلى #{{position}}",
"footer": "Remix Music • متبقي {{remaining}} مسار في قائمة الانتظار"
}
}
}
+39 -2
View File
@@ -88,7 +88,10 @@
"normalize": "گۆڕینی یەکسانسازیی دەنگی داینامیکی (ئاستی ReplayGain) لەنێوان سەرچاوەکانی مۆسیقادا.",
"bassboost": "بەکاربردنی کاریگەریی ئیكوالایزەری بەرزکردنەوەی باس بە ئاستی نزم، مامناوەند یان بەهێز.",
"speed": "دەستکاریکردنی خێرایی لێدانی تراکی ئێستا (0.5× بۆ 2.0×).",
"pitch": "دەستکاریکردنی تۆن و ئاستی دەنگی تراکی ئێستا (0.5× بۆ 2.0×)."
"pitch": "دەستکاریکردنی تۆن و ئاستی دەنگی تراکی ئێستا (0.5× بۆ 2.0×).",
"previous": "لێدانی گۆرانی پێشوو لە مێژووی لێدان.",
"replay": "دووبارە لێدانی گۆرانیی ئێستا لە سەرەتاوە.",
"skipto": "پەڕینەوەی ڕاستەوخۆ بۆ گۆرانییەکی دیاریکراو لە ڕیزبەندی."
},
"options": {
"debug": {
@@ -184,6 +187,9 @@
},
"lyrics": {
"query": "ناوی گۆرانی و هونەرمەند بۆ گەڕان بەدوای هۆنراوە (ئارەزوومەندانە)."
},
"skipto": {
"position": "ژمارەی گۆرانییەکە لە ڕیزبەندی بۆ پەڕینەوە بۆی."
}
},
"pagination": {
@@ -510,7 +516,15 @@
"playbackErrorAuthor": "🎵 پاسەوانی پەخشی لێدان",
"streamUnavailableTitle": "پەخش بەردەست نییە",
"streamErrorTitle": "پەخشی لێدان پچڕا",
"streamErrorFooter": "پەڕینەوە بۆ گۆرانی داهاتوو • {{prefix}}play بۆ زیادکردنی گۆرانی زیاتر"
"streamErrorFooter": "پەڕینەوە بۆ گۆرانی داهاتوو • {{prefix}}play بۆ زیادکردنی گۆرانی زیاتر",
"autoResumeAuthor": "▶️ ژووری دەنگی چالاکە",
"autoResumeDesc": "گوێگرێک هاتە ناو ژووری دەنگی — دەستپێکردنەوەی لێدان بەشێوەی خۆکار.",
"serverMutedAuthor": "🔇 بۆت لەلایەن سێرڤەرەوە بێدەنگ کرا",
"serverMutedTitle": "لێدان ڕاگیرا",
"serverMutedDesc": "بۆتەکە لەلایەن بەڕێوەبەری سێرڤەرەوە بێدەنگ کرا. لێدان ڕاگیرا بۆ پاراستنی شوێنی گۆرانی.",
"serverUnmutedAuthor": "🔊 بێدەنگی بۆت هەڵگیرا",
"serverUnmutedTitle": "لێدان دەستیپێکردەوە",
"serverUnmutedDesc": "بێدەنگی بۆت هەڵگیرا — لێدان بەشێوەی خۆکار دەستیپێکردەوە."
},
"playnext": {
"searching": "🔍 گەڕان...",
@@ -1226,6 +1240,29 @@
"reorderedDesc": "لە پێگەی **#{{from}}** ➔ **#{{to}}** لە ڕیزبەندی گوازرایەوە.",
"nowPlayingNext": "ئێستا دوای گۆرانی ئێستا پەخش دەکرێت • {{prefix}}np",
"viewUpdatedQueue": "{{prefix}}list بۆ بینینی ڕیزبەندی نوێکراوە"
},
"previous": {
"noHistory": "هیچ گۆرانییەکی پێشوو لە مێژووی لێداندا نییە.",
"failed": "لێدانی گۆرانی پێشوو سەرکەوتوو نەبوو.",
"author": "مێژووی لێدان • گۆرانی پێشوو",
"title": "گۆرانی پێشوو گەڕێندرایەوە",
"footer": "مێژووی لێدان • {{count}} گۆرانیی پێشوو ماونەتەوە"
},
"replay": {
"nothingPlaying": "لە ئێستادا هیچ گۆرانییەک لێنادرێت!",
"live": "ناتوانرێت پەخشی ڕاستەوخۆ یان ڕادیۆ دووبارە بکرێتەوە.",
"failed": "دووبارە لێدانی گۆرانییەکە سەرکەوتوو نەبوو.",
"author": "دووبارە لێدان • 0:00",
"title": "گۆرانییەکە لە سەرەتاوە دووبارە دەستیپێکردەوە",
"footer": "Remix Music • لێدان لە سەرەتاوە (ماوە: {{duration}})"
},
"skipto": {
"emptyQueue": "ڕیزبەندی بەتاڵە! هیچ گۆرانییەکی داهاتوو نییە بۆ پەڕینەوە بۆی.",
"invalidPosition": "ژمارەی نادروستە! تکایە ژمارەیەک لە نێوان 1 و {{max}} بنووسە.",
"failed": "پەڕینەوە بۆ گۆرانییە دیاریکراوەکە سەرکەوتوو نەبوو.",
"author": "گەڕان لە ڕیزبەندی • پەڕینەوەی گۆرانی",
"title": "{{count}} گۆرانی پەڕێندرا — پەڕینەوە بۆ #{{position}}",
"footer": "Remix Music • {{remaining}} گۆرانی لە ڕیزبەندی ماوەتەوە"
}
}
}
+39 -2
View File
@@ -88,7 +88,10 @@
"normalize": "Dynamische Lautstärkenormalisierung (ReplayGain-Pegel) über verschiedene Musikquellen umschalten.",
"bassboost": "Equalizer-Bass-Boost mit Voreinstellungen (niedrig, mittel, stark) anwenden.",
"speed": "Wiedergabegeschwindigkeit des aktuellen Tracks anpassen (0.5× bis 2.0×).",
"pitch": "Tonhöhe (Pitch) des aktuellen Tracks anpassen (0.5× bis 2.0×)."
"pitch": "Tonhöhe (Pitch) des aktuellen Tracks anpassen (0.5× bis 2.0×).",
"previous": "Den vorherigen Titel aus dem Wiedergabeverlauf abspielen.",
"replay": "Den aktuellen Titel von vorne starten.",
"skipto": "Direkt zu einem bestimmten Titel in der Warteschlange springen."
},
"options": {
"debug": {
@@ -184,6 +187,9 @@
},
"lyrics": {
"query": "Der Songtitel und Künstler, nach dessen Songtext gesucht werden soll (optional)."
},
"skipto": {
"position": "Die Nummer des Titels in der Warteschlange, zu dem gesprungen werden soll."
}
},
"pagination": {
@@ -510,7 +516,15 @@
"playbackErrorAuthor": "🎵 Wiedergabe-Stream-Wächter",
"streamUnavailableTitle": "Stream nicht verfügbar",
"streamErrorTitle": "Wiedergabe-Stream unterbrochen",
"streamErrorFooter": "Überspringe zum nächsten Track • {{prefix}}play für weitere Songs"
"streamErrorFooter": "Überspringe zum nächsten Track • {{prefix}}play für weitere Songs",
"autoResumeAuthor": "▶️ Sprachkanal aktiv",
"autoResumeDesc": "Ein Hörer ist dem Sprachkanal beigetreten — Wiedergabe wird automatisch fortgesetzt.",
"serverMutedAuthor": "🔇 Bot vom Server stummgeschaltet",
"serverMutedTitle": "Wiedergabe pausiert",
"serverMutedDesc": "Der Bot wurde von einem Server-Administrator stummgeschaltet. Die Wiedergabe wurde pausiert, um die Position zu sichern.",
"serverUnmutedAuthor": "🔊 Bot-Stummschaltung aufgehoben",
"serverUnmutedTitle": "Wiedergabe fortgesetzt",
"serverUnmutedDesc": "Die Stummschaltung des Bots wurde aufgehoben — Wiedergabe wird automatisch fortgesetzt."
},
"playnext": {
"searching": "🔍 Suche...",
@@ -1226,6 +1240,29 @@
"reorderedDesc": "Von Position **#{{from}}** ➔ **#{{to}}** in der Warteschlange verschoben.",
"nowPlayingNext": "Wird als Nächstes nach dem aktuellen Titel abgespielt • {{prefix}}np",
"viewUpdatedQueue": "{{prefix}}list um die aktualisierte Warteschlange anzuzeigen"
},
"previous": {
"noHistory": "Es befindet sich kein vorheriger Titel im Wiedergabeverlauf.",
"failed": "Der vorherige Titel konnte nicht abgespielt werden.",
"author": "Wiedergabeverlauf • Vorheriger Titel",
"title": "Vorheriger Titel wiederhergestellt",
"footer": "Wiedergabeverlauf • Noch {{count}} vorherige(r) Titel verfügbar"
},
"replay": {
"nothingPlaying": "Derzeit wird nichts abgespielt!",
"live": "Livestreams oder Radiosender können nicht von vorne gestartet werden.",
"failed": "Der Titel konnte nicht erneut abgespielt werden.",
"author": "Wiederholung • 0:00",
"title": "Titel von Anfang an neu gestartet",
"footer": "Remix Music • Wiedergabe vom Beginn (Dauer: {{duration}})"
},
"skipto": {
"emptyQueue": "Die Warteschlange ist leer! Keine weiteren Titel zum Überspringen vorhanden.",
"invalidPosition": "Ungültige Position! Bitte gib eine Zahl zwischen 1 und {{max}} ein.",
"failed": "Das Springen zum ausgewählten Titel ist fehlgeschlagen.",
"author": "Warteschlangen-Navigation • Titel überspringen",
"title": "{{count}} Titel übersprungen — Zu #{{position}} gesprungen",
"footer": "Remix Music • Noch {{remaining}} Titel in der Warteschlange"
}
}
}
+39 -2
View File
@@ -88,7 +88,10 @@
"normalize": "Toggle dynamic volume normalization (ReplayGain leveling) across music sources.",
"bassboost": "Apply a low, medium, or hard bass boost equalizer effect.",
"speed": "Adjust the playback speed of the current track (0.5× to 2.0×).",
"pitch": "Adjust the audio pitch of the current track (0.5× to 2.0×)."
"pitch": "Adjust the audio pitch of the current track (0.5× to 2.0×).",
"previous": "Play the previous track from playback history.",
"replay": "Restart the current song from the beginning.",
"skipto": "Skip directly to a specific track in the queue."
},
"options": {
"debug": {
@@ -184,6 +187,9 @@
},
"lyrics": {
"query": "The song title and artist to search lyrics for (optional)."
},
"skipto": {
"position": "The track number in the queue to jump to."
}
},
"pagination": {
@@ -725,7 +731,15 @@
"playbackErrorAuthor": "🎵 Playback Stream Watchdog",
"streamUnavailableTitle": "Stream Unavailable",
"streamErrorTitle": "Playback Stream Interrupted",
"streamErrorFooter": "Skipping to next track • {{prefix}}play to queue more songs"
"streamErrorFooter": "Skipping to next track • {{prefix}}play to queue more songs",
"autoResumeAuthor": "▶️ Voice Channel Active",
"autoResumeDesc": "Listener joined the voice channel — automatically resuming playback.",
"serverMutedAuthor": "🔇 Bot Muted by Server",
"serverMutedTitle": "Playback Paused",
"serverMutedDesc": "The bot was muted by a server administrator. Playback is paused to preserve track position.",
"serverUnmutedAuthor": "🔊 Bot Unmuted",
"serverUnmutedTitle": "Playback Resumed",
"serverUnmutedDesc": "The bot was unmuted — automatically resuming playback."
},
"playnext": {
"searching": "🔍 Searching...",
@@ -1226,6 +1240,29 @@
"reorderedDesc": "Moved from position **#{{from}}** ➔ **#{{to}}** in the queue.",
"nowPlayingNext": "Now playing next after the current song • {{prefix}}np",
"viewUpdatedQueue": "{{prefix}}list to view updated queue"
},
"previous": {
"noHistory": "There is no previous song in playback history.",
"failed": "Failed to play the previous track.",
"author": "Playback History • Previous Track",
"title": "Restored Previous Song",
"footer": "Playback History • {{count}} previous song(s) remaining"
},
"replay": {
"nothingPlaying": "There is nothing playing at the moment!",
"live": "Cannot replay live streams or radio stations.",
"failed": "Failed to replay the track.",
"author": "Playback Replay • 0:00",
"title": "Restarted Song From Beginning",
"footer": "Remix Music • Playing from start (duration: {{duration}})"
},
"skipto": {
"emptyQueue": "The queue is empty! There are no upcoming songs to jump to.",
"invalidPosition": "Invalid position! Please enter a number between 1 and {{max}}.",
"failed": "Failed to jump to the specified song.",
"author": "Queue Navigation • Jump Track",
"title": "Skipped {{count}} track(s) — Jumped to #{{position}}",
"footer": "Remix Music • {{remaining}} track(s) remaining in queue"
}
}
}
+39 -2
View File
@@ -88,7 +88,10 @@
"normalize": "Alternar normalização dinâmica de volume (nivelamento ReplayGain) entre diferentes fontes de música.",
"bassboost": "Aplicar equalizador de reforço de graves (baixo, médio ou pesado).",
"speed": "Ajustar a velocidade de reprodução da faixa atual (0.5× a 2.0×).",
"pitch": "Ajustar o tom (pitch) do áudio da faixa atual (0.5× a 2.0×)."
"pitch": "Ajustar o tom (pitch) do áudio da faixa atual (0.5× a 2.0×).",
"previous": "Tocar a faixa anterior do histórico de reprodução.",
"replay": "Reiniciar a música atual do início.",
"skipto": "Pular diretamente para uma faixa específica na fila."
},
"options": {
"debug": {
@@ -184,6 +187,9 @@
},
"lyrics": {
"query": "O título da música e o artista para pesquisar a letra (opcional)."
},
"skipto": {
"position": "O número da faixa na fila para onde pular."
}
},
"pagination": {
@@ -510,7 +516,15 @@
"playbackErrorAuthor": "🎵 Monitor de Fluxo de Reprodução",
"streamUnavailableTitle": "Transmissão Indisponível",
"streamErrorTitle": "Fluxo de Reprodução Interrompido",
"streamErrorFooter": "Pulando para a próxima faixa • {{prefix}}play para adicionar mais músicas"
"streamErrorFooter": "Pulando para a próxima faixa • {{prefix}}play para adicionar mais músicas",
"autoResumeAuthor": "▶️ Canal de Voz Ativo",
"autoResumeDesc": "Um ouvinte entrou no canal de voz — retomando a reprodução automaticamente.",
"serverMutedAuthor": "🔇 Bot Mutado pelo Servidor",
"serverMutedTitle": "Reprodução Pausada",
"serverMutedDesc": "O bot foi mutado por um administrador do servidor. A reprodução foi pausada para preservar a posição.",
"serverUnmutedAuthor": "🔊 Bot Desmutado",
"serverUnmutedTitle": "Reprodução Retomada",
"serverUnmutedDesc": "O bot foi desmutado — retomando a reprodução automaticamente."
},
"playnext": {
"searching": "🔍 Buscando...",
@@ -1226,6 +1240,29 @@
"reorderedDesc": "Movido da posição **#{{from}}** ➔ **#{{to}}** na fila.",
"nowPlayingNext": "Tocará a seguir após a música atual • {{prefix}}np",
"viewUpdatedQueue": "{{prefix}}list para ver a fila atualizada"
},
"previous": {
"noHistory": "Não há nenhuma música anterior no histórico de reprodução.",
"failed": "Falha ao tocar a música anterior.",
"author": "Histórico de Reprodução • Faixa Anterior",
"title": "Música Anterior Restaurada",
"footer": "Histórico de Reprodução • Restam {{count}} música(s) no histórico"
},
"replay": {
"nothingPlaying": "Não há nada tocando no momento!",
"live": "Não é possível reiniciar transmissões ao vivo ou rádios.",
"failed": "Falha ao reiniciar a faixa.",
"author": "Repetir Faixa • 0:00",
"title": "Música Reiniciada do Início",
"footer": "Remix Music • Tocando do início (duração: {{duration}})"
},
"skipto": {
"emptyQueue": "A fila está vazia! Não há faixas seguintes para pular.",
"invalidPosition": "Posição inválida! Insira um número entre 1 e {{max}}.",
"failed": "Falha ao pular para a faixa especificada.",
"author": "Navegação na Fila • Pular Faixa",
"title": "{{count}} faixa(s) pulada(s) — Pulou para #{{position}}",
"footer": "Remix Music • Restam {{remaining}} faixa(s) na fila"
}
}
}
+39 -2
View File
@@ -88,7 +88,10 @@
"bassboost": "Düşük, orta veya sert bas güçlendirme ekolayzer efekti uygulayın.",
"speed": "Mevcut parçanın oynatma hızını ayarlayın (0.5× ile 2.0× arası).",
"pitch": "Mevcut parçanın ses perdesini (pitch) ayarlayın (0.5× ile 2.0× arası).",
"vote": "FluxerList üzerinde sunucunuz/botunuz için oylama bilgilerini görüntüleyin veya oy verenleri kontrol edin"
"vote": "FluxerList üzerinde sunucunuz/botunuz için oylama bilgilerini görüntüleyin veya oy verenleri kontrol edin",
"previous": "Oynatma geçmişindeki önceki şarkıyı çal.",
"replay": "Çalan şarkıyı baştan başlat.",
"skipto": "Kuyruktaki belirli bir şarkıya doğrudan atla."
},
"options": {
"debug": {
@@ -184,6 +187,9 @@
},
"lyrics": {
"query": "Şarkı sözlerini aramak için şarkı adı ve sanatçı (isteğe bağlı)."
},
"skipto": {
"position": "Atlanacak şarkının kuyruktaki sıra numarası."
}
},
"pagination": {
@@ -714,7 +720,15 @@
"playbackErrorAuthor": "🎵 Oynatma Akışı Denetleyicisi",
"streamUnavailableTitle": "Akış Kullanılamıyor",
"streamErrorTitle": "Oynatma Akışı Kesildi",
"streamErrorFooter": "Sonraki parçaya geçiliyor • Daha fazla şarkı için {{prefix}}play"
"streamErrorFooter": "Sonraki parçaya geçiliyor • Daha fazla şarkı için {{prefix}}play",
"autoResumeAuthor": "▶️ Ses Kanalı Aktif",
"autoResumeDesc": "Ses kanalına bir dinleyici katıldı — oynatma otomatik olarak sürdürülüyor.",
"serverMutedAuthor": "🔇 Bot Sunucuda Susturuldu",
"serverMutedTitle": "Oynatma Duraklatıldı",
"serverMutedDesc": "Bot bir sunucu yöneticisi tarafından susturuldu. Şarkı konumunu korumak için oynatma duraklatıldı.",
"serverUnmutedAuthor": "🔊 Bot Susturması Kaldırıldı",
"serverUnmutedTitle": "Oynatma Sürdürülüyor",
"serverUnmutedDesc": "Botun susturması kaldırıldı — oynatma otomatik olarak devam ediyor."
},
"playnext": {
"searching": "🔍 Aranıyor...",
@@ -1226,6 +1240,29 @@
"reorderedDesc": "Kuyrukta **#{{from}}** ➔ **#{{to}}** konumuna taşındı.",
"nowPlayingNext": "Şimdi geçerli şarkıdan sonra çalacak • {{prefix}}np",
"viewUpdatedQueue": "Güncellenmiş kuyruğu görmek için {{prefix}}list"
},
"previous": {
"noHistory": "Oynatma geçmişinde önceki bir şarkı bulunmuyor.",
"failed": "Önceki şarkı çalınamadı.",
"author": "Oynatma Geçmişi • Önceki Şarkı",
"title": "Önceki Şarkı Geri Yüklendi",
"footer": "Oynatma Geçmişi • Kalan {{count}} önceki şarkı"
},
"replay": {
"nothingPlaying": "Şu anda hiçbir şey çalmıyor!",
"live": "Canlı yayınlar veya radyo istasyonları yeniden başlatılamaz.",
"failed": "Şarkı yeniden başlatılamadı.",
"author": "Yeniden Oynat • 0:00",
"title": "Şarkı Baştan Başlatıldı",
"footer": "Remix Music • Baştan çalınıyor (süre: {{duration}})"
},
"skipto": {
"emptyQueue": "Kuyruk boş! Atlanacak bir sonraki şarkı bulunmuyor.",
"invalidPosition": "Geçersiz sıra numarası! Lütfen 1 ile {{max}} arasında bir sayı girin.",
"failed": "Belirtilen şarkıya atlanamadı.",
"author": "Kuyruk Gezinme • Şarkıya Atla",
"title": "{{count}} şarkı atlandı — #{{position}} numaralı şarkıya geçildi",
"footer": "Remix Music • Kuyrukta kalan {{remaining}} şarkı"
}
}
}