Available Commands
| Command | Action | Emoji |
|---|---|---|
/play | Resume playback | ▶️ |
/pause | Pause playback | ⏸️ |
/skip | Skip to next track | ⏭️ |
/next | Skip to next track | ⏭️ |
Spotify commands use the
/ prefix instead of !. From SpotifyHandler.ts:7, the usage is defined as:Setup & Authentication
Before using Spotify commands, you need to link your Spotify account.Copy callback URL
After authorization, you’ll be redirected to a URL that won’t load. Copy the entire URL from your browser’s address bar.
Play Music
Resume playback on your active Spotify device.Pause Playback
Pause the currently playing track.Skip Tracks
Skip to the next track in your queue.Both
/skip and /next perform the same action. From SpotifyHandler.ts:18:Requirements
Spotify API playback control requires a Premium subscription. Free accounts cannot use these features.
You must have Spotify open and playing on at least one device (phone, computer, web player, etc.)
Your WhatsApp account must be linked to your Spotify account through the bot’s OAuth flow
Error Handling
Account Not Linked
No Active Device
General Errors
- Network connectivity issues
- Expired authentication tokens
- Spotify API rate limits
- Non-premium accounts
Invalid Command
Command Mapping
From SpotifyHandler.ts:15-22, commands are mapped to actions:/ commands are recommended for brevity.
Implementation Details
Playback Control
From SpotifyHandler.ts:30, the bot calls the Spotify service:- OAuth token management
- Spotify API requests
- Device detection
- Error handling
Supported Actions
From SpotifyHandler.ts:24, only four actions are supported:Use Cases
Quick Playback Control
Control music without leaving WhatsApp:Skipping Songs
Quickly skip tracks you don’t want to hear:Hands-Free Control
Control playback when your hands are busy:- Cooking and don’t want to touch your phone
- Working out and phone is across the room
- Driving with voice-to-text (use responsibly)
Why do I need Spotify Premium?
Why do I need Spotify Premium?
Can I search for songs or playlists?
Can I search for songs or playlists?
The current implementation only supports play, pause, and skip controls. Search functionality and playlist management are not implemented. These could be added as future enhancements.
What happens if my Spotify session expires?
What happens if my Spotify session expires?
OAuth tokens can expire. If you get authentication errors, you may need to re-link your account by following the authentication flow again.
Can I control which device plays?
Can I control which device plays?
The current implementation uses your most recently active Spotify device. There’s no device selection feature, but you can control which device by making it active in Spotify before sending commands.
Why use /play instead of !play?
Why use /play instead of !play?
The
/ prefix is used to distinguish Spotify commands from other bot commands. From the command handler registration (index.ts:27-30), both prefixes work, but / is the recommended convention for Spotify.Limitations
- No volume control - Cannot adjust playback volume
- No track selection - Cannot play specific songs or artists
- No playlist management - Cannot browse or modify playlists
- No previous track - Cannot go back to the previous song
- No shuffle/repeat - Cannot toggle shuffle or repeat modes
- No currently playing info - Cannot query what’s playing