feat: /dj slash command for offsite jukebox (Spotify + djbox, real Tempo tips)#43
Open
max-digi wants to merge 4 commits into
Open
feat: /dj slash command for offsite jukebox (Spotify + djbox, real Tempo tips)#43max-digi wants to merge 4 commits into
max-digi wants to merge 4 commits into
Conversation
Adds a /dj Slack command that lets anyone in a tipbot channel queue or skip music with real Tempo tips. Pairs with tempoxyz/djbox PR #28. Subcommands: - queue <spotify/youtube url or search> ($0.005, default) - skip ($0.0002) - nowplaying, where, help Routing: - Spotify URL or free-text -> Spotify Web API (add-to-queue on the venue laptop's active device) - YouTube URL -> djbox enqueue - Skip -> Spotify skip if configured, otherwise djbox skip-bid pot Every action settles a real on-chain tip to DJ_HOUSE_PROVIDER_USER_ID via Tip.handleTipRequest before queueing/skipping. Tx hash is included in the public Slack reply. New env: - DJBOX_URL, DJBOX_PARTY_ID, DJBOX_SECRET - DJ_HOUSE_PROVIDER_USER_ID, DJ_QUEUE_PRICE_USD, DJ_SKIP_PRICE_USD - SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET, SPOTIFY_REFRESH_TOKEN New scripts: - pnpm spotify:setup one-time localhost OAuth helper to mint the Spotify refresh token Slack manifest now registers /dj alongside /tip. Amp-Thread-ID: https://ampcode.com/threads/T-019e4c08-478b-730e-9eea-fe7310856ca4 Co-authored-by: Amp <amp@ampcode.com>
Goes djbox-only for the offsite. Spotify had no remove-from-queue API, so an upcoming-track veto wouldn't have worked there. djbox owns the playlist, so vetoing upcoming tracks (and seeing the queue) all works. - Remove Spotify Web API client + OAuth setup script + env vars - Drop Spotify path from /dj queue and /dj skip - /dj list -> shows now-playing + next 10 upcoming with veto pots - /dj veto <position> -> tip ($DJ_VETO_PRICE_USD, defaults to queue price) feeds a per-track veto pot; cleared pot removes the track from queue - /dj nowplaying now reads from djbox (no Spotify required) - Real Tempo tip still settles before every queue/skip/veto Requires tempoxyz/djbox#28 with the new /state and /veto endpoints. Amp-Thread-ID: https://ampcode.com/threads/T-019e4c08-478b-730e-9eea-fe7310856ca4 Co-authored-by: Amp <amp@ampcode.com>
Original event payload had stale author_association; force a fresh synchronize event so the gate evaluates against current state. Amp-Thread-ID: https://ampcode.com/threads/T-019e4c08-478b-730e-9eea-fe7310856ca4 Co-authored-by: Amp <amp@ampcode.com>
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.
Adds a
/djSlack command so anyone in a tipbot channel can drive the djbox jukebox with real Tempo tips. Built for the offsite — pairs with tempoxyz/djbox#28.djbox-only by design. Spotify was considered but dropped: Spotify's Web API has no remove-from-queue endpoint, so an upcoming-track veto wouldn't have worked there. djbox owns the playlist, so one queue, one rule-set, one tippable surface.
UX
/dj queue <youtube url>/dj queue <spotify url>/dj queue <free text>/dj skip/dj veto <position>/dj list/dj nowplaying/dj where/dj helpEvery action settles via
Tip.handleTipRequesttoDJ_HOUSE_PROVIDER_USER_IDbefore the queue/skip/veto fires. The public Slack reply includes the tx hash.New files
src/lib/djbox.ts— djbox client (search, enqueue, skip-bid, veto, get-state) + YouTube/Spotify URL parsing + YouTube/Spotify oEmbed metadata helpersNew env
Slack manifest now registers
/dj(and/djpr<N>for PR previews) alongside/tip.Note
Could not run
vp check/vp testin my local shell (node binary path mismatch with vp's runtime manager).tsgo -btype-check passes. Please runvp check+vp testhere before merge — happy to fix any formatter nits in a follow-up.