mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
Add seek validation, autoplay system, progress bar & codebase cleanup
- Add seek duration validation — seeks beyond track length are rejected with clear error showing max allowed position - Add autoplay system with Last.fm similar tracks + YouTube search fallback — automatically queues similar tracks when queue ends - Add live progress bar to now playing with elapsed/total time display - Add robust ffmpeg cleanup to prevent race conditions during seek/skip/filter operations - Add proper queue advancement after seek so bot stays in voice - Add queueEnd event emission on skip/skipTo for autoplay trigger - Add _lastPlayedTrack preservation for autoplay recommendations
This commit is contained in:
1 parent
bc1fe82919
commit
0f2ee99f1e
23 files changed
+665
-170
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { CommandBuilder } from "../src/CommandHandler.mjs";
|
||||
|
||||
export const command = new CommandBuilder()
|
||||
.setName("move")
|
||||
.setDescription("Move a track from one position to another in the queue.", "commands.move")
|
||||
.setCategory("music")
|
||||
.addAliases("mv", "m")
|
||||
.addNumberOption(o =>
|
||||
o.setName("from")
|
||||
.setDescription("The current position of the track in the queue. You can view the indices with the 'list' command.", "options.move.from")
|
||||
.setRequired(true)
|
||||
)
|
||||
.addNumberOption(o =>
|
||||
o.setName("to")
|
||||
.setDescription("The target position to move the track to in the queue.", "options.move.to")
|
||||
.setRequired(true)
|
||||
);
|
||||
|
||||
export async function run(message, data) {
|
||||
const p = await this.getPlayer(message, false, false, false);
|
||||
if (!p) return;
|
||||
const from = data.get("from")?.value;
|
||||
const to = data.get("to")?.value;
|
||||
if (from == null || from < 1) return message.replyEmbed("Source position must be 1 or greater.");
|
||||
if (to == null || to < 1) return message.replyEmbed("Target position must be 1 or greater.");
|
||||
const res = p.move(from, to);
|
||||
message.replyEmbed(res);
|
||||
}
|
||||
Reference in new issue
Block a user