feat: adding buttons to random command - #7
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds interactive playback controls to a Discord music bot by implementing pause, resume, and remove buttons for the random song command. The changes enhance user experience by allowing real-time control over music playback without requiring additional slash commands.
- Adds playback session management with pause, resume, and remove functionality
- Implements Discord button components for music control
- Expands the random song command with interactive UI elements
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.tsbuildinfo | Updates TypeScript build info with new source files |
| src/helpers/playback.ts | Adds session management and playback control functions |
| src/helpers/open-ai.ts | Increases song selection from 3 to 15 songs and adds exclusion logic |
| src/events/interactionCreate.ts | Implements button interaction handlers for playback controls |
| src/commands/chat-commands/vibe.ts | New command for vibe-based playlist generation |
| src/commands/chat-commands/vibe.test.ts | Test file for vibe command (placeholder implementation) |
| src/commands/chat-commands/random-song.ts | Adds interactive buttons to the random song command |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| { | ||
| role: "user", | ||
| content: `Give me 3 amazing songs from the genre ${genre} as JSON under 'picks'. Try to stay in songs that were released in the last 5 years unless the genre specifically has a year attached to it.`, | ||
| content: `Select songs for genre: "${genre}. Avoid any in the exlcusions provided next.`, |
There was a problem hiding this comment.
Missing closing quote after '${genre}' - this will cause a syntax error in the template string.
| content: `Select songs for genre: "${genre}. Avoid any in the exlcusions provided next.`, | |
| content: `Select songs for genre: "${genre}". Avoid any in the exclusions provided next.`, |
| pause, | ||
| play | ||
| ); | ||
| await interaction.editReply({ |
There was a problem hiding this comment.
The interaction.editReply is called twice (lines 28 and 54-57), which will cause an error since the interaction can only be edited once after being deferred.
No description provided.