title: How do i make it so that my bot autoamtticly kicks people when they have 3 warnings in discord.py rewrite
body: <p>So here is my code for the warning system:</p>
  
  <pre><code>@commands.has_permissions(manage_messages=True)
  async def warn(ctx,user:discord.User,*reason:str):
    if not reason:
      await ctx.send("Du skal lige give mig en grund til din Advarsel!")
      return
    reason = ' '.join(reason)
    for current_user in report['users']:
      if current_user['name'] == user.name:
        current_user['reasons'].append(reason)
        break
    else:
      await ctx.send(f"{user.name} er blevet advaret med grunden: '{reason}'")
      report['users'].append({
        'name':user.name,
        'reasons': [reason,]
      })
  
    with open('reports.json','w+') as f:
      json.dump(report,f)
  
  @client.command()
  @commands.has_permissions(manage_messages=True)
  async def warnings(ctx,user:discord.User):
    for current_user in report['users']:
      if user.name == current_user['name']:
        await ctx.send(f"{user.name} er blevet advaret {len(current_user['reasons'])} gange : {','.join(current_user['reasons'])}")
        break
    else:
      await ctx.send(f"{user.name} er aldrig blevet advaret!")
  </code></pre>
  
  <p>all i'm asking is help with making so when they have 3 warnings in my reports.json file that they get kicked..</p>
  
  <p>and i little disclaimer.. i didn't write all that code myself, i took it off stack and modified</p>