#Loop error on client.on

1 messages · Page 1 of 1 (latest)

granite vessel
          client.on('message', message => {
            while(turn < maxturn) {
              console.log(turn)
              if (!battle_status) return;
              if (message.author.id != member.id) return;
              if (own_magic.indexOf(message.content) != -1 && message.author.id == member.id) {```

If own_magic not include message.content, gonna return.
i want just 1 return.. but gonna infinite loop started