title: How do i make a leaderboard for my invite tracker discord bot? discord.py
body: <p>I want to add a leaderboard to my invite tracker discord.py bot. Here is my invite code.</p>
  <pre><code>    @client.command()
  async def invites(ctx, user = None):
    if user == None:
      totalInvites = 0
      for i in await ctx.guild.invites():
          if i.inviter == ctx.author:
              totalInvites += i.uses
      await ctx.send(f&quot;You've invited {totalInvites} member{'' if totalInvites == 1 else 's'} to the server!&quot;)
    else:
      totalInvites = 0
      for i in await ctx.guild.invites():
         member = ctx.message.guild.get_member_named(user)
         if i.inviter == member:
           totalInvites += i.uses
      await ctx.send(f&quot;{member} has invited {totalInvites} member{'' if totalInvites == 1 else 's'} to the server!&quot;)
  </code></pre>
  <p>Any help would be usefull.</p>