jeudi 5 juillet 2018

|| operator/expression is not working as "or" [on hold]

I'm trying to use the || operator which is known as "or" in vb.net as far as I know.

The environment says:

Invalid expression term ||

if (!IsUserSupport((SocketGuildUser)Context.User)) || 
   (!IsUserAdmin((SocketGuildUser)Context.User)) || 
   (!IsUserSAdmin((SocketGuildUser)Context.User));
{
    await Context.Channel.SendMessageAsync(Context.User.Mention + 
        "You do not have the required role to use this command :x:");

    return;
}

As a discord bot, I'm trying to say if that user who uses the command does not have the support role, admin role nor SAdmin role will not be able to do so.

Aucun commentaire:

Enregistrer un commentaire