1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

Fixed syntax error

This commit is contained in:
Phxntxm 2016-07-17 10:24:49 -05:00
parent 016606c0b2
commit 071ea01426

View file

@ -16,17 +16,19 @@ class Stats:
async def mostboops(self, ctx):
"""Shows the person you have 'booped' the most, as well as how many times"""
boops = config.getContent('boops')
members = ctx.message.server.members
if not boops.get(ctx.message.author.id):
await self.bot.say("You have not booped anyone {} Why the heck not...?".format(ctx.message.author.mention))
return
most_boops = 0
for b_id,amt in boops.get(ctx.message.author.id).items():
if amt > most_boops:
member = find(lambda m: m.id == b_id, self.bot.get_all_members())
if member in members and amt > most_boops:
most_boops = amt
most_id = b_id
member = find(lambda m: m.id == b_id, self.bot.get_all_members())
member = find(lambda m: m.id == most_id, self.bot.get_all_members())
await self.bot.say("{0} you have booped {1} the most amount of times, coming in at {2} times".format(
ctx.message.author.mention, member.mention, most_boops))
@ -36,7 +38,7 @@ class Stats:
"""Lists all the users you have booped and the amount of times"""
members = ctx.message.server.members
boops = config.getContent('boops')
if boops is None or boops.get(ctx.message.author.id):
if boops is None or boops.get(ctx.message.author.id) is None:
await self.bot.say("You have not booped anyone {} Why the heck not...?".format(ctx.message.author.mention))
return
output = "You have booped:"