From fe2d62cd477301402c0f5d5405b160d1242f5380 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 24 Jun 2021 08:52:24 +0200 Subject: [PATCH] :sparkles: allow bot tokens --- src/util/checkToken.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/checkToken.ts b/src/util/checkToken.ts index 4a60195b..d890e0e1 100644 --- a/src/util/checkToken.ts +++ b/src/util/checkToken.ts @@ -4,6 +4,7 @@ import { UserModel } from "../models"; export function checkToken(token: string, jwtSecret: string): Promise { return new Promise((res, rej) => { + token = token.replace("Bot ", ""); // TODO: proper bot support jwt.verify(token, jwtSecret, JWTOptions, async (err, decoded: any) => { if (err || !decoded) return rej("Invalid Token");