Handle if someone has battled someone then left the server
This commit is contained in:
parent
13f2b89e81
commit
a5b21eaa68
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue