Skip to content

Commit

Permalink
Maintained access level after the command to renew registration
Browse files Browse the repository at this point in the history
  • Loading branch information
decimo3 committed Mar 27, 2024
1 parent 9db3bab commit e9e29a6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Handles/HandleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ public async static Task HandleManager(HandleMessage bot, Configuration cfg, Use
{
case "autorizar":
case "atualizar":
if((int)usuario.has_privilege > 0)
if((int)usuario.has_privilege > 1)
{
await bot.sendTextMesssageWraper(user.id, $"Usuário {usuario.id} com acesso de {usuario.has_privilege.ToString()} não tem prazo de expiração!");
}
else
{
usuario.has_privilege = UsersModel.userLevel.eletricista;
if(usuario.has_privilege == UsersModel.userLevel.desautorizar)
{
usuario.has_privilege = UsersModel.userLevel.eletricista;
}
await alterarUsuario(bot, user, usuario, request);

}
break;
case "desautorizar":
Expand Down

0 comments on commit e9e29a6

Please sign in to comment.