Fixed Deprecation of Ephemeral

This commit is contained in:
2026-04-06 16:21:57 +02:00
parent 0769a482fb
commit 564216ee8a
14 changed files with 56 additions and 55 deletions
+2 -1
View File
@@ -79,7 +79,8 @@ module.exports = {
// Draw the second line of text with black outline
ctx.strokeText(text, textX, 100 + pfp.height);
ctx.fillText(text, textX, 100 + pfp.height);
const banner = canvas.toBuffer();
channel.send({
content: `Bitte guck einmal in die <#455023824791011338> ${member}`,
files: [{
+7 -7
View File
@@ -1,4 +1,4 @@
const { Events } = require('discord.js')
const { Events, MessageFlags } = require('discord.js')
module.exports = {
name: Events.InteractionCreate,
@@ -22,9 +22,9 @@ async function commandHandler(interaction) {
} catch (error) {
console.error(error);
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
await interaction.followUp({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
} else {
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
await interaction.reply({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
}
}
}
@@ -36,9 +36,9 @@ async function buttonHandler(interaction) {
} catch (error) {
console.error(error);
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
await interaction.followUp({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
} else {
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
await interaction.reply({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
}
}
}
@@ -50,9 +50,9 @@ async function selectMenuHandler(interaction) {
} catch (error) {
console.error(error);
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
await interaction.followUp({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
} else {
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
await interaction.reply({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
}
}
}