diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-06-24 08:52:24 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-06-24 08:52:24 +0200 |
commit | fe2d62cd477301402c0f5d5405b160d1242f5380 (patch) | |
tree | 03e199f638afdf2b56255143ffc33f62a1a1fb88 /src/util | |
parent | Message reply (diff) | |
download | server-fe2d62cd477301402c0f5d5405b160d1242f5380.tar.xz |
:sparkles: allow bot tokens
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/checkToken.ts | 1 |
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"); |