fix(bots/discord): remove useless feature

This commit is contained in:
PalmDevs
2024-04-02 19:29:29 +07:00
parent 5d9b4d31c6
commit d830e48bc2
2 changed files with 0 additions and 14 deletions

View File

@@ -1,7 +0,0 @@
import { on } from '$utils/discord/events'
import { leaveDisallowedGuild } from '$utils/discord/security'
on('guildCreate', async ({ config }, guild) => {
if (config.allowedGuilds.includes(guild.id)) return
await leaveDisallowedGuild(guild)
})

View File

@@ -1,7 +0,0 @@
import type { Guild } from 'discord.js'
import { logger } from '../../context'
export const leaveDisallowedGuild = (guild: Guild) => {
logger.warn(`Server ${guild.name} (${guild.id}) is not allowed to use this bot.`)
return guild.leave().then(() => logger.debug(`Left guild ${guild.name} (${guild.id})`))
}