title: Discord bot : Check who invited someone
body: <p>I'm creating a discord bot which rewards users for the amount of invites they have. </p>
  
  <p>The API allows you to retrieve the invitecount of an user when they do !invites for example however this can be easily botted so I'm trying to find a way to prevent botters.</p>
  
  <p>Current code :</p>
  
  <pre><code>[Command("test")]
  public async Task InviteCheck()
  {
      var test = await Context.Guild.GetInvitesAsync();
  
      foreach (var tests in test)
      {
          if (Context.User.Username + "#" + Context.User.Discriminator == tests.Inviter.ToString())
          {
              //amount of invites
              await Context.Channel.SendMessageAsync(tests.Uses.ToString());
          }
      }
  }
  </code></pre>
  
  <p>So I got this idea to check when an user joins and then check their invite link, but apparently this is not included in the API. </p>
  
  <p>In the documentation : <a href="https://discord.foxbot.me/docs/api/Discord.IInviteMetadata.html" rel="nofollow noreferrer">https://discord.foxbot.me/docs/api/Discord.IInviteMetadata.html</a> </p>
  
  <p>it shows that I can retrieve the inviter information (I'm not certain) but I have no clue on how to use Iinvitemetadata.</p>
  
  <p>Tldr; I want to make a discord bot which checks howmany valid invitations an user has, delete the invitation if the invited user leaves. User must be in group for 10 minutes before counting as an invitation.</p>