use connection revoked error

This commit is contained in:
Puyodead1 2022-12-24 16:28:41 -05:00
parent 6d6944cfee
commit 7e10d73dac
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -58,8 +58,7 @@ router.get("/", route({}), async (req: Request, res: Response) => {
], ],
}); });
if (!connectedAccount) throw DiscordApiErrors.UNKNOWN_CONNECTION; if (!connectedAccount) throw DiscordApiErrors.UNKNOWN_CONNECTION;
if (connectedAccount.revoked) if (connectedAccount.revoked) throw DiscordApiErrors.CONNECTION_REVOKED;
throw new ApiError("Connection revoked", 0, 400);
if (!connectedAccount.token_data) if (!connectedAccount.token_data)
throw new ApiError("No token data", 0, 400); throw new ApiError("No token data", 0, 400);