summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-24 08:52:24 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-24 08:52:24 +0200
commitfe2d62cd477301402c0f5d5405b160d1242f5380 (patch)
tree03e199f638afdf2b56255143ffc33f62a1a1fb88
parentMessage reply (diff)
downloadserver-fe2d62cd477301402c0f5d5405b160d1242f5380.tar.xz
:sparkles: allow bot tokens
-rw-r--r--src/util/checkToken.ts1
1 files changed, 1 insertions, 0 deletions
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<any> { 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");