From 8e8c1bb56f239f40dc379de865a6238045274cb3 Mon Sep 17 00:00:00 2001 From: PAW122 <70094237+PAW122@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:53:48 +0200 Subject: [PATCH] add group update --- commands/normal/add_group.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/normal/add_group.js b/commands/normal/add_group.js index d2e6a3d..689c684 100644 --- a/commands/normal/add_group.js +++ b/commands/normal/add_group.js @@ -30,8 +30,10 @@ async function execute(interaction, client) { const user_id = interaction.user.id const data = db.read(`${server_id}.groups`) - if (!data || data.status === false) { - return await interaction.reply("this function is disbaled on this server") + + const groups_settings = data.settings + if (!groups_settings || !groups_settings.status || groups_settings.status != true) { + return interaction.reply({ content: 'Groups are disabled on this server.', ephemeral: true }); } const category_id = data.settings.category_id