From e9855591b29af53826dc781fab856b68c4c25da0 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Mon, 29 Jan 2024 18:49:14 +0500 Subject: [PATCH] fix goodbye and welcome not setting image --- commands/Administration/goodbye.js | 6 +++--- commands/Administration/welcome.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 10a6e9a4..7b3d6882 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -111,11 +111,11 @@ class Goodbye extends BaseCommand { data.guildData.markModified("plugins.goodbye"); await data.guildData.save(); - interaction.success("administration/goodbye:DISABLED"); + interaction.success("administration/goodbye:DISABLED", null, { ephemeral: true }); } else { 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") || true; + const image = interaction.options.getBoolean("image") === true ? true : false; data.guildData.plugins.goodbye = { enabled: true, @@ -128,7 +128,7 @@ class Goodbye extends BaseCommand { await data.guildData.save(); interaction.success("administration/goodbye:ENABLED", { - channel: `<#${data.guildData.plugins.goodbye.channel}>`, + channel: `${channel.toString()}`, }, { ephemeral: true }); } } diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index b5d975d5..06732d66 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -111,11 +111,11 @@ class Welcome extends BaseCommand { data.guildData.markModified("plugins.welcome"); await data.guildData.save(); - interaction.success("administration/welcome:DISABLED"); + interaction.success("administration/welcome:DISABLED", null, { ephemeral: true }); } else { 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") || true; + const image = interaction.options.getBoolean("image") === true ? true : false; data.guildData.plugins.welcome = { enabled: true, @@ -128,7 +128,7 @@ class Welcome extends BaseCommand { await data.guildData.save(); interaction.success("administration/welcome:ENABLED", { - channel: `<#${data.guildData.plugins.welcome.channel}>`, + channel: `${channel.toString()}`, }, { ephemeral: true }); } }