async def leaderboard(self, ctx, compid, category=None):
     #return await ctx.send('Looks like comps are currently under maintenance! Sorry, trying to bring them up again as soon as possible. In the meantime, make sure to use our other commands in `n.help`!')
     if category not in ['races', 'speed', 'points', 'accuracy']:
         embed=Embed('Invalid category!', f'Make sure to use a valid category for this command!\nValid categorys are `races`, `points`, `speed` or `accuracy`.\n\n__How do I use a category?__\nJust simply run one of these commands:\n`n.lb {compid} races`\n`n.lb {compid} points`\n`n.lb {compid} speed`\n`n.lb {compid} accuracy`\n\n*Please note that commands might take a while to compile!*', 'warning')
         #embed = Embed('Error!', 'The only categories for competitions are: `races`, `speed`, `accuracy`, or `points`.')
         return await embed.send(ctx)
     else:
         await nitrotype.update_comp(compid)
         lb = await nitrotype.l(compid, category=category)
         embed = discord.Embed(
             title='Live Leaderboards',
             description='This is where you can view everyone\'s progress during the competition!',
             color=0x15E700
         )
         usernames = []
         races = []
         for stat in lb[1]:
             if stat[1] == '':
                 usernames.append(f'{stat[0]}\n')
             else:
                 usernames.append(f'{stat[1]}\n')
             races.append(str(round(stat[2], 2)))
         usernames = ''.join(usernames)
         races = '\n'.join(races)
         embed.add_field(
             name='Team Members',
             value=usernames
         )
         embed.add_field(
             name=category,
             value=races
         )
         await ctx.send(embed=embed)
 async def endcomp(self, ctx, compid):
     await nitrotype.update_comp(compid)
     dbclient = DBClient()
     collection = dbclient.db['test']
     data = await dbclient.get_array(collection, {'$and': [{'compid': compid}, {'compid': compid}]})
     async for d in data:
         data = d
         old = data.copy()
     data = data
     other = data['other']
     if other['ended'] == True:
         embed = Embed('Error!', 'LMAO you already ended the comp before!')
         return await embed.send(ctx)
     if ctx.author.id != other['author'] and ctx.author.id not in [505338178287173642, 637638904513691658, 396075607420567552]:
         embed = Embed("Bruh Alert", "Yes thank you for trying ot delete someone **else\'s** competition!", "warning")
         
         return await embed.send(ctx)
     embed = discord.Embed(title="Sucess!", description=f"You have succesfully ended the competition ***manually*** for Team **{other['team']}** and Comp ID `{compid}`! Results will be sent to dms!")
     date = other['endcomptime']
     timestamp = datetime.fromtimestamp(date)
     embed.set_footer(text=f"This competition was scheduled to end at {timestamp.strftime('%Y-%m-%d %H:%M:%S')}")
     await ctx.send(embed=embed)
     lb = await nitrotype.l(str(compid))
     embed = discord.Embed(
         title='Competition results',
         description='This is where you can view everyone\'s progress during the competition!',
         color=0x15E700
     )
     usernames = []
     races = []
     for stat in lb[1]:
         if stat[1] == '':
             usernames.append(f'{stat[0]}\n')
         else:
             usernames.append(f'{stat[1]}\n')
         races.append(str(stat[2]))
     usernames = ''.join(usernames)
     races = '\n'.join(races)
     embed.add_field(
         name='Team Members',
         value=usernames
     )
     embed.add_field(
         name="Races",
         value=races
     )
     user = await self.client.fetch_user(other['author'])
     try:
         await user.send(embed=embed)
         await user.send('Your conpetition has ended! Comp ID: `'+compid+'`.  Check out the other categories of your competition by doing `n.lb '+compid+'` and adding `speed`, `accuracy`, `races`, or `points`. Ex: `n.lb '+compid+' points`')
     except:
         pass
       
       
     
     
     requests.post('https://backupcomps.adl212.repl.co/backupcomp', data={"id": compid, "comp_data": json.dumps(data['players'])})
     other['ended'] = True
     await dbclient.update_array(collection, old, data)