Skip to content

feat: adding buttons to random command - #7

Merged
jaredgrxss merged 6 commits into
mainfrom
addingButtonsToRandomCommand
Aug 13, 2025
Merged

feat: adding buttons to random command#7
jaredgrxss merged 6 commits into
mainfrom
addingButtonsToRandomCommand

Conversation

@jaredgrxss

Copy link
Copy Markdown
Owner

No description provided.

@jaredgrxss
jaredgrxss requested a review from Copilot August 13, 2025 12:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/helpers/open-ai.ts Outdated
Comment thread src/helpers/open-ai.ts Outdated
{
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.`,

Copilot AI Aug 13, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing quote after '${genre}' - this will cause a syntax error in the template string.

Suggested change
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.`,

Copilot uses AI. Check for mistakes.
pause,
play
);
await interaction.editReply({

Copilot AI Aug 13, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread src/events/interactionCreate.ts Outdated
@jaredgrxss
jaredgrxss merged commit 2c9bee4 into main Aug 13, 2025
1 check passed
@jaredgrxss
jaredgrxss deleted the addingButtonsToRandomCommand branch August 13, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants