Skip to content

Commit

Permalink
❌ Caso o bot esteja desabilitado, não permita.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashu11-A committed Apr 17, 2024
1 parent 1e96120 commit 58e4d08
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/discord/components/index.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 58e4d08

Please sign in to comment.