Update to modern Discord.js ephemeral message pattern

- Replace ephemeral: true with flags: [MessageFlags.Ephemeral]
- Add MessageFlags import to Discord.js imports
- Update all slash command error responses to use modern flag syntax
- Maintains same functionality with Discord.js v14 best practices

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chris Ham
2025-08-16 15:01:49 -07:00
parent 437206851b
commit bc74978a79
4 changed files with 56 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
const { SlashCommandBuilder } = require('discord.js');
const { SlashCommandBuilder, MessageFlags } = require('discord.js');
const sfxManager = require('../../services/sfxManager');
const voiceService = require('../../services/voiceService');
@@ -20,7 +20,7 @@ module.exports = {
if (!allowedChannels.test(interaction.channel.name)) {
return interaction.reply({
content: 'Sound effects are not allowed in this channel!',
ephemeral: true
flags: [MessageFlags.Ephemeral]
});
}
}
@@ -36,7 +36,7 @@ module.exports = {
if (!sfxManager.hasSFX(sfxName)) {
return interaction.reply({
content: 'This sound effect does not exist!',
ephemeral: true
flags: [MessageFlags.Ephemeral]
});
}
@@ -45,7 +45,7 @@ module.exports = {
if (!member.voice.channel) {
return interaction.reply({
content: 'You need to be in a voice channel to use this command!',
ephemeral: true
flags: [MessageFlags.Ephemeral]
});
}