From 38385a9761a7527f53a3fa6f1062e0244fe882f5 Mon Sep 17 00:00:00 2001 From: Xargana Date: Wed, 16 Apr 2025 23:02:51 +0300 Subject: [PATCH] a --- discord/classes/Bot.js | 16 +++------------- discord/classes/SystemCommandBase.js | 8 -------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/discord/classes/Bot.js b/discord/classes/Bot.js index e961d5e..b2991bc 100644 --- a/discord/classes/Bot.js +++ b/discord/classes/Bot.js @@ -57,17 +57,7 @@ class Bot { // Interaction event this.client.on("interactionCreate", async (interaction) => { - // Only process commands if: - // 1. It's a DM channel - // 2. The user is authorized - if (interaction.channel?.type !== ChannelType.DM) { - await interaction.reply({ - content: "This bot only works in direct messages for security reasons.", - ephemeral: true - }); - return; - } - + // Only process commands if the user is authorized if (interaction.user.id !== this.authorizedUserId) { console.log(`Unauthorized access attempt by ${interaction.user.tag} (${interaction.user.id})`); await interaction.reply({ @@ -92,7 +82,7 @@ class Bot { async sendStartupNotification() { // Create startup embed const startupEmbed = { - title: "VPS Control Bot Status", + title: "blahaj.tr bot status update", description: `Bot started successfully at `, color: 0x00ff00, fields: [ @@ -108,7 +98,7 @@ class Bot { } ], footer: { - text: "VPS Control Bot" + text: "blahaj.tr" } }; diff --git a/discord/classes/SystemCommandBase.js b/discord/classes/SystemCommandBase.js index 8cd5690..055f526 100644 --- a/discord/classes/SystemCommandBase.js +++ b/discord/classes/SystemCommandBase.js @@ -18,14 +18,6 @@ class SystemCommandBase extends CommandBase { }); } - // Additional DM-only check - if (interaction.channel.type !== 'DM') { - return interaction.reply({ - content: "System commands can only be used in Direct Messages for security.", - ephemeral: true - }); - } - return originalExecute.call(this, interaction); }; }