Refine VoteSkipService warnings and remove redundant announce calls

Updated the warning message in `VoteSkipService` to provide more precise feedback when attempting to vote on an empty queue. Removed an unnecessary `announce` call in `MusicRoutes`'s `resumePlayback` for cleaner and more concise code execution.
This commit is contained in:
anthorob committed 2026-10-09 03:16:09 -04:00
1 parent b7d19b6d56
commit 861b3f90e7
2 files changed
+2 -3

No files matched your search

@@ -221,7 +221,6 @@ public final class MusicRoutes {
private static void resumePlayback(Supplier<JDA> jdaSupplier, MusicService musicService, Context ctx) { private static void resumePlayback(Supplier<JDA> jdaSupplier, MusicService musicService, Context ctx) {
MusicManager manager = manager(jdaSupplier, musicService, ctx); MusicManager manager = manager(jdaSupplier, musicService, ctx);
manager.unpauseTrack(); manager.unpauseTrack();
announce(manager, "Resuming current track");
ctx.json(Map.of("status", "ok", "message", "Resuming current track")); ctx.json(Map.of("status", "ok", "message", "Resuming current track"));
} }
@@ -347,7 +346,7 @@ public final class MusicRoutes {
MusicManager manager = musicService.get(guild); MusicManager manager = musicService.get(guild);
String userId = ctx.pathParam("userId"); String userId = ctx.pathParam("userId");
CacheOrFetch.<Member>resolve( CacheOrFetch.resolve(
ctx, ctx,
() -> guild.getMemberById(userId), () -> guild.getMemberById(userId),
() -> guild.retrieveMemberById(userId), () -> guild.retrieveMemberById(userId),
@@ -56,7 +56,7 @@ public class VoteSkipService {
TrackInfo info = queueManager.peekHeadOfQueue(); TrackInfo info = queueManager.peekHeadOfQueue();
if (info == null) { if (info == null) {
return QueueActionResult.warn("Queue is empty"); return QueueActionResult.warn("The queue is empty, you can't cast a vote on an empty queue");
} }
// Minus the bot itself // Minus the bot itself