not allowing banned users to link accounts

This commit is contained in:
Jack 2021-08-24 02:02:10 +01:00
parent 4aaa8dbb21
commit 05626fda06

View file

@ -141,6 +141,9 @@ class UserController {
"This Discord account is already linked to a different account"
);
}
if (user.banned === true) {
throw new MonkeyError(403, "Banned accounts cannot link with Discord");
}
await UsersDAO.linkDiscord(uid, did);
await BotDAO.linkDiscord(uid, did);
return res.status(200).json({