From 58e4d083d2621e7cf9fa5f4b3cea331beea04c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A7=81Ash=C3=BB=EA=A7=82?= <30575805+Ashu11-A@users.noreply.github.com> Date: Wed, 17 Apr 2024 17:03:51 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9D=8C=20Caso=20o=20bot=20esteja=20desabilit?= =?UTF-8?q?ado,=20n=C3=A3o=20permita.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/discord/components/index.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/discord/components/index.ts b/src/discord/components/index.ts index 8d9b49bf..667af1e0 100644 --- a/src/discord/components/index.ts +++ b/src/discord/components/index.ts @@ -1,11 +1,11 @@ // Isso irá pegar todos os eventos que um botão é precionado e irá destrinjar ele para os seus reais ações import { core } from '@/app' import { CustomButtonBuilder, Discord } from '@/functions' +import getSettings from '@/functions/getSettings' +import internalDB from '@/settings/settings.json' +import { EmbedBuilder } from 'discord.js' import { Event } from '../base' import { ButtonController } from './controller' -import { EmbedBuilder } from 'discord.js' -import internalDB from '@/settings/settings.json' -import getSettings from '@/functions/getSettings' new Event({ name: 'interactionCreate', @@ -33,7 +33,15 @@ new Event({ if (internalDB?.expired === undefined || internalDB.expired) { await interaction.reply({ ephemeral, - embeds: [new EmbedBuilder({ title: '⚠️ Token ou Login invalidos.' }).setColor('Red')] + embeds: [new EmbedBuilder({ title: '⚠️ Licença do bot expirou!' }).setColor('Red')] + }) + return + } + + if (internalDB?.enabled === undefined || !internalDB.enabled) { + await interaction.reply({ + ephemeral, + embeds: [new EmbedBuilder({ title: '⚠️ Bot desabilitado!' })] }) return }