lundi 16 juillet 2018

conditions not working (Discordia)

I'm trying to make a bot for discord that generates social security numbers using Discordia and my conditions doesn't seem to work. I tried everything but I can't make it, the function is working properly, but when I put a number higher than 30 it should return an error, but it generates the social security number without returning anything. code below:

   if (tonumber(numg)) and (tonumber(numg) >= 0) and (math.floor(tonumber(numg)) == tonumber(numg)) then
    --the function (working well)
    elseif tonumber(numg) > 30 then

      message.channel:send("Muitos CPFs, por favor, insira um número menor")

    else 

      message.channel:send("Insira parâmetros válidos")

    end

Aucun commentaire:

Enregistrer un commentaire