mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 22:24:58 +05:00
fallbacks for welcome and goodbye
This commit is contained in:
parent
abb8da6127
commit
fd2796865c
3 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue