Skip to content

Conversation

@NICK-FURY-6023
Copy link
Collaborator

Changes

  • Fixed deprecation warning for ephemeral interaction responses in Discord.js v14+
  • Replaced ephemeral: true with flags: MessageFlags.Ephemeral
  • Replaced CommandInteraction with ChatInputCommandInteraction for proper typing
  • Removed unnecessary ephemeral: false (default value)

Files Changed

  • src/buttons/Queue.ts
  • src/buttons/Shuffle.ts
  • src/commands/Music/Insert.ts
  • src/commands/Music/Play.ts
  • src/commands/Music/Radio.ts
  • src/commands/Playlist/Add.ts
  • src/commands/Playlist/Editor.ts
  • src/events/track/trackStart.ts
  • src/services/ReplyInteractionService.ts
  • src/structures/CommandHandler.ts
  • src/structures/PageQueue.ts

Testing

  • Bot runs without deprecation warnings
  • All commands work as expected

- Fixed deprecation warning for ephemeral interaction responses
- Replaced ephemeral: true with flags: MessageFlags.Ephemeral
- Replaced CommandInteraction with ChatInputCommandInteraction for proper typing
- Removed unnecessary ephemeral: false (default value)
Copilot AI review requested due to automatic review settings January 9, 2026 15:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request modernizes the Discord.js implementation by replacing deprecated ephemeral options with the newer MessageFlags.Ephemeral flag, aligning with Discord.js v14+ best practices. The PR also improves type safety by replacing generic CommandInteraction types with more specific ChatInputCommandInteraction types.

Key Changes:

  • Replaced deprecated ephemeral: true with flags: MessageFlags.Ephemeral across 6 files
  • Updated type annotations from CommandInteraction to ChatInputCommandInteraction in 4 autocomplete functions
  • Removed unnecessary default ephemeral: false option

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/structures/PageQueue.ts Updated buttonPage method to use MessageFlags.Ephemeral
src/structures/CommandHandler.ts Removed redundant ephemeral: false default parameter
src/services/ReplyInteractionService.ts Removed redundant ephemeral: false and added defensive semicolon
src/events/track/trackStart.ts Updated two message.reply calls to use MessageFlags.Ephemeral
src/events/guild/messageCreate.ts Reformatted regex declaration for better readability
src/commands/Playlist/Editor.ts Updated type from CommandInteraction to ChatInputCommandInteraction
src/commands/Playlist/Add.ts Updated autocomplete function to use ChatInputCommandInteraction
src/commands/Music/Radio.ts Updated message.reply to use MessageFlags.Ephemeral
src/commands/Music/Play.ts Updated autocomplete function to use ChatInputCommandInteraction
src/commands/Music/Insert.ts Updated autocomplete function to use ChatInputCommandInteraction
src/buttons/Shuffle.ts Updated message.reply to use MessageFlags.Ephemeral
src/buttons/Queue.ts Updated message.reply to use MessageFlags.Ephemeral

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)

const value = (interaction.options as CommandInteractionOptionResolver).getString('id')
const value = (interaction as ChatInputCommandInteraction).options.getString('id')
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

The type cast on this line is redundant since the interaction parameter is already typed as ChatInputCommandInteraction in the function signature. You can simplify this to: const value = interaction.options.getString('id')

Suggested change
const value = (interaction as ChatInputCommandInteraction).options.getString('id')
const value = interaction.options.getString('id')

Copilot uses AI. Check for mistakes.

setTimeout(() => {
(!setup || setup == null || setup.channel !== this.message.channelId) && msg
;(!setup || setup == null || setup.channel !== this.message.channelId) && msg
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

Variable 'setup' cannot be of type null, but it is compared to an expression of type null.

Suggested change
;(!setup || setup == null || setup.channel !== this.message.channelId) && msg
;(!setup || setup.channel !== this.message.channelId) && msg

Copilot uses AI. Check for mistakes.
@NICK-FURY-6023 NICK-FURY-6023 merged commit 5d33540 into main Jan 9, 2026
7 checks passed
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