fix(arabot): add check for restricted user on database for unrestrictions

This commit is contained in:
smyalygames
2023-02-15 20:32:20 +00:00
parent dab4f1767c
commit 63a320535c

View File

@@ -131,7 +131,7 @@ export class UnRestrictCommand extends Command {
}
// Check if mod is in database
if (!await userExists(mod.id)) {
if (!await userExists(modId)) {
await addExistingUser(mod);
}
@@ -147,6 +147,11 @@ export class UnRestrictCommand extends Command {
return info;
}
// Check if mod is in database
if (!await userExists(userId)) {
await addExistingUser(member);
}
const restrictRoles = IDs.roles.restrictions.restricted;
// Checks if the user is not restricted