From 70a1d75344a1677d6188c88698e5515b1e3347ea Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 14 Nov 2025 22:11:54 +0100 Subject: [PATCH] fix(lib/perm): now the bot by-pass the whitelist - The nuke command wasn't possible is the bot wasn't whitelist - My vision of the whitelist is to restrict people (other bots too) not block the bot itself --- src/lib/perm.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/perm.ts b/src/lib/perm.ts index 1d5f4ad..be4816e 100644 --- a/src/lib/perm.ts +++ b/src/lib/perm.ts @@ -1,4 +1,5 @@ import { prisma } from '@lib/prisma'; +import { client } from '@lib/client'; import { User as UserPrisma } from '@prisma/client'; /** @@ -7,6 +8,9 @@ import { User as UserPrisma } from '@prisma/client'; * @returns true if the user is whitelisted flase overwise */ export async function isWhitelisted(userId: string, guildId: string): Promise { + if (client.user?.id == userId) { + return true; + } const userData: UserPrisma = await prisma.user.findUnique({ where: { id: userId, @@ -22,5 +26,5 @@ export async function isWhitelisted(userId: string, guildId: string): Promise