mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(bots/discord): remove useless feature
This commit is contained in:
@@ -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)
|
||||
})
|
||||
@@ -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})`))
|
||||
}
|
||||
Reference in New Issue
Block a user