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:
NoLogicAlan committed 2026-05-21 02:04:05 +03:00
1 parent bc1fe82919
commit 0f2ee99f1e
23 files changed
+665 -170

No files matched your search

-4
View File
@@ -9,7 +9,6 @@ export const command = new CommandBuilder()
.addAliases("info")
.setCategory("util");
const CACHE_TTL_MS = 5 * 60 * 1000;
let cachedUserCount = null;
@@ -96,7 +95,6 @@ function getLivePlayerCount(playerMap) {
return live;
}
let cachedGuildCount = null;
let guildCacheExpiresAt = 0;
@@ -131,7 +129,6 @@ async function getGuildCount(client) {
}
}
function buildEmbed(t, msg, { guildCount, userCount, playerCount, scrobbleCount, linkedUsers, ping, uptime, comHash, comLink, reason, footer, loading, lastfmEnabled }) {
const num = (v) => Utils.formatNumber(v);
const ld = (v) => loading ? "..." : v;
@@ -169,7 +166,6 @@ function buildEmbed(t, msg, { guildCount, userCount, playerCount, scrobbleCount,
return builder;
}
export async function run(message) {
const lastfm = this.lastfm;
const lastfmEnabled = lastfm?.enabled ?? false;