Fixed Deprecation of Ephemeral
This commit is contained in:
@@ -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: [{
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user