Fix: Replace deprecated ephemeral with MessageFlags.Ephemeral
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 6s

Fixes Discord.js v14 deprecation warning by replacing all
ephemeral: true usages with flags: [MessageFlags.Ephemeral].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 18:22:44 +01:00
parent d65e613cdd
commit f78636447b
5 changed files with 33 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
import { SlashCommandBuilder, EmbedBuilder, MessageFlags } from 'discord.js';
import { Command } from '../../structures/Command.js';
import { Deployer } from '../../structures/Deployer.js';
@@ -24,14 +24,14 @@ const command: Command = {
if (!client.application?.owner) await client.application?.fetch();
if (interaction.user.id !== client.application?.owner?.id) {
await interaction.reply({ content: 'Keine Berechtigung.', ephemeral: true });
await interaction.reply({ content: 'Keine Berechtigung.', flags: [MessageFlags.Ephemeral] });
return;
}
const subcommand = interaction.options.getSubcommand();
if (subcommand === 'deploy') {
await interaction.deferReply({ ephemeral: true });
await interaction.deferReply({ flags: [MessageFlags.Ephemeral] });
try {
const count = await Deployer.deploy(client.user!.id, client.token!);
@@ -44,7 +44,7 @@ const command: Command = {
}
if (subcommand === 'stats') {
await interaction.deferReply({ ephemeral: true });
await interaction.deferReply({ flags: [MessageFlags.Ephemeral] });
const uptime = process.uptime();
const days = Math.floor(uptime / 86400);
@@ -69,7 +69,7 @@ const command: Command = {
}
if (subcommand === 'servers') {
await interaction.deferReply({ ephemeral: true });
await interaction.deferReply({ flags: [MessageFlags.Ephemeral] });
const guilds = client.guilds.cache.map((guild: any) =>
`• **${guild.name}** \`(${guild.id})\` - ${guild.memberCount} Mitglieder`
@@ -97,7 +97,7 @@ const command: Command = {
const nextEmbed = new EmbedBuilder()
.setColor(0xf1c40f)
.setDescription(chunks[i].substring(0, 4000));
await interaction.followUp({ embeds: [nextEmbed], ephemeral: true });
await interaction.followUp({ embeds: [nextEmbed], flags: [MessageFlags.Ephemeral] });
}
return;
}