fix goodbye and welcome not setting image

This commit is contained in:
Jonny_Bro (Nikita) 2024-01-29 18:49:14 +05:00
parent 57b4acc540
commit e9855591b2
No known key found for this signature in database
GPG key ID: 391C19BE62D36B33
2 changed files with 6 additions and 6 deletions

View file

@ -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 });
}
}

View file

@ -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 });
}
}