Feat/skip votes - #8
Merged
Merged
Conversation
- separate skip intent from upvotes: a popular song (many upvotes) was easier to skip under the old model, which is inverted - unique (song_id, user_id) enforces one skip-vote per user per song
- playNextFromRoomInner could re-pick the currently-streaming song (still played=false until it finishes) and restart yt-dlp + ffmpeg from scratch
- new /skip-vote endpoint: registers a per-user skip-vote on the current song; auto-executes the skip once tally >= skipThreshold(roomPresence) - the adder can skip directly (owner bypass); double-voting returns 409 - /skip and /songs now report skipVotesCount + userSkipVote instead of reusing the upvote tally, which was inverted (popular songs skipped easier) - roomPresence counts Discord voice listeners (voicePresenceByRoom) plus web presence, so a minority web vote can't skip a song many hear in voice - cascade-delete skip_votes on song/room/playlist/GC cleanup - web: skip button shows N/threshold, a check once voted, owner skips directly; pendingSongs excludes the streaming song by id, not slice(1)
- /room reports the bound room id, owner, bot status, now-playing, and a browser link so server members can find and join the same room - /skip now enforces the same skip-vote gate as the web (adder bypass or skipThreshold votes), instead of a one-click bypass - /stop and /reset are room-wide actions, now gated behind Manage Server instead of any member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.