1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Handle if someone has battled someone then left the server

This commit is contained in:
Phxntxm 2017-03-23 22:02:42 -05:00
parent 13f2b89e81
commit a5b21eaa68

View file

@ -196,6 +196,10 @@ class Interaction:
return
battleP1 = discord.utils.find(lambda m: m.id == p1[0], ctx.message.guild.members)
if battleP1 is None:
await ctx.send("The person who challenged you to a battle has apparently left the server....why?")
return
battleP2 = ctx.message.author
# Get a random win message from our list
@ -228,6 +232,10 @@ class Interaction:
return
battleP1 = discord.utils.find(lambda m: m.id == p1[0], ctx.message.guild.members)
if battleP1 is None:
await ctx.send("The person who challenged you to a battle has apparently left the server....why?")
return
battleP2 = ctx.message.author
# There's no need to update the stats for the members if they declined the battle