diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 52d2fcdf..27aed65e 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -96,9 +96,9 @@ class Goodbye extends BaseCommand { interaction.success("administration/goodbye:DISABLED"); } else { - const channel = interaction.options.getChannel("channel"); + const channel = interaction.options.getChannel("channel") || interaction.channel; const message = interaction.options.getString("message") || interaction.translate("administration/goodbye:DEFAULT_MESSAGE"); - const image = interaction.options.getBoolean("image"); + const image = interaction.options.getBoolean("image") || true; data.guildData.plugins.goodbye = { enabled: true, diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index 778b3d54..e63d3f1a 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -96,9 +96,9 @@ class Welcome extends BaseCommand { interaction.success("administration/welcome:DISABLED"); } else { - const channel = interaction.options.getChannel("channel"); + const channel = interaction.options.getChannel("channel") || interaction.channel; const message = interaction.options.getString("message") || interaction.translate("administration/welcome:DEFAULT_MESSAGE"); - const image = interaction.options.getBoolean("image"); + const image = interaction.options.getBoolean("image") || true; data.guildData.plugins.welcome = { enabled: true, diff --git a/events/MessageHandler.js b/events/MessageHandler.js index 78170e55..52f9ec9d 100644 --- a/events/MessageHandler.js +++ b/events/MessageHandler.js @@ -106,8 +106,8 @@ class MessageCreate extends BaseEvent { if (data.guildData.plugins.automod.enabled && !data.guildData.plugins.automod.ignored.includes(message.channel.id)) if (/(discord\.(gg|io|me|li)\/.+|discordapp\.com\/invite\/.+)/i.test(message.content)) if (!message.channel.permissionsFor(message.member).has(PermissionsBitField.Flags.ManageMessages)) { - message.delete(); message.error("administration/automod:DELETED"); + message.delete(); } const afkReason = data.userData.afk;