dimanche 5 juillet 2020

Unexpected token, `else` [duplicate]

So I'm working on a discord bot and it says that the token else is not expected, but I have no idea where the problem is, I've been bashing my head over this for an hour

            if (player.role != "d") return "notDetective"
            else if (player.uses >= 3) return "outOfUse"
            else if (msg.mentions.users.length > 0) return "multiple"
            else if (msg.mentions.users.length < 0) return "noPing"
            else if (this.players.filter(p => p.user == msg.mentions.guildMembers.first()).role == "t") player.uses +=1; return "traitor"
            else player.uses ++; return "innocent"; break

Aucun commentaire:

Enregistrer un commentaire