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,50 +1,98 @@
**GENERAL**
```
2+2, ahhh, alert, aspen, auw, aww, bonk, bustin, chafe, chipotle, chomp, choochoo, correct, date, dong, duck, enjoy, ez, fakehands, fbrage, fine, flippers, funnyhow, gatekeepah, gcn, groovy, gyst, help, herewego, heyheyhey, heymf, highscore, hop, how, hype, idgaf, imawot, interesting, jacked, knob, lab, laugh, lisa, long, mad, massage, mayo, meme, mmmm, mouthfeel, mybody, neat, nevergiveup, obaeb, ohno, okusa, onejoint, onfire, ow, poopy, popup, porkchop, pour, ppump, qty, raffle, rawr, rentfree, respect, robotears, rpgfarm, sdgtw, sendit, sofast, sogood, stick, store, suh, swag, tasty, tea, thatthing, theline, tmm, tojesus, tootski, trash, triple, urf, wahwah, wanker, waow, wdied, wow, yahoo, yippee, yoshi, youguys
```
**NERDS**
```
anders, blazeit, booty, butt, bwaa, disagree, doomtaonline, duckscream, emmapos, fdup, fk, fuckduck,hellway, jebaited, lol, mcgasm, milk, myman, nfc, oh, pprage, ppscream, rando, rip, run, runsover, sgqf, smd, speednoises, stfu, tbhamfact, teats, whathaveidone
```
**HAM**
```
archery, hamhelp, hamlaugh, hamlaugh2, hamscream, pyle, spam, speedrunner, stank, wait, why
```
**JOSH**
```
blblbl, goofy, joshbitch, joshgoat, joshlaugh, joshlaugh2, joshlaugh3, joshlaugh4, joshscream, joshwhinny, joshx
```
**LANX**
```
dominos, lanx, lanx2
```
**MUTT**
```
muttfart, muttfart2, muttlaugh, muttscream, muttwalksin, wobbuffet
```
**EMMA**
```
airplane, bye, byeb, emetarage, emetarage2, emetarage3, fu, split
```
**DEEBS**
```
1v2, bossmusic, dbio, deebsfart, deebslaugh, english, fencedash, lanmo, timmon, trinexx, vitty
```
**STEPHEN**
```
craft, diaper, f, mothhole
```
**FRICKER**
```
anteater, eggs, fuzzy, h2o, ncd, shj
```
**XELNA**
```
wiki, xelboss, xelkiss
```
**TWIN PEAKS**
```
albert, andhot, coffee, dead, drinkfull, fish, gordon, gordon2, gordon3, gordon4, gotalight, gum, letsrock, mapleham, mrjackpots, myarms, newshoes, present, veranda, vision
```
**ATHF**
```
arise, bananas, bjqueen, carlcandy, dontmatter, gross, hahaa, hightonight, idc, kudos, lang, party, rockin, threat, tonight, watchyourback
```
**IT CROWD**
```
20gp, door, esp, hammertime, oldman, seaparks, seeitnow
```
**SIMPSONS**
```
learnding, mash, nerd, rake, stahp, toofat, towel
```
**JURASSIC PARK**
```
bigshit, clever, digup, dinodna, dodson, hatethatman, hrwah, hunt, please, pushpush, trex, tour
```
**THE GOOD PLACE**
banana, human, puzzles, shirtballs, unhelpful

View File

@@ -1,4 +1,4 @@
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js');
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, MessageFlags } = require('discord.js');
const configManager = require('../../config/config');
module.exports = {
@@ -92,7 +92,7 @@ module.exports = {
if (!databaseService) {
return interaction.reply({
content: '❌ Database service not available.',
ephemeral: true
flags: [MessageFlags.Ephemeral]
});
}

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]
});
}

View File

@@ -5,6 +5,7 @@ const {
REST,
Routes,
ActivityType,
MessageFlags,
} = require("discord.js");
const { generateDependencyReport } = require("@discordjs/voice");
const intents = require("./config/intents");
@@ -201,7 +202,7 @@ client.on(Events.InteractionCreate, async (interaction) => {
await interaction
.reply({
content: "There was an error executing this command!",
ephemeral: true,
flags: [MessageFlags.Ephemeral],
})
.catch(console.error);
}