🐛 You can now challenge other players to connect four
This commit is contained in:
@@ -53,7 +53,19 @@ class ConnectFour():
|
|||||||
logMessage = "They tried to play against a difficulty that doesn't exist"
|
logMessage = "They tried to play against a difficulty that doesn't exist"
|
||||||
canStart = False
|
canStart = False
|
||||||
|
|
||||||
elif type(opponent) == discord.user:
|
elif type(opponent) == discord.member.Member:
|
||||||
|
if opponent.bot:
|
||||||
|
# User has challenged a bot
|
||||||
|
if opponent == self.bot.user:
|
||||||
|
# It was Gwendolyn
|
||||||
|
difficulty = 3
|
||||||
|
diffText = f" with difficulty {difficulty}"
|
||||||
|
opponent = f"#{self.bot.user.id}"
|
||||||
|
else:
|
||||||
|
sendMessage = "You can't challenge a bot!"
|
||||||
|
logMessage = "They tried to challenge a bot"
|
||||||
|
canStart = False
|
||||||
|
else:
|
||||||
# Opponent is another player
|
# Opponent is another player
|
||||||
if ctx.author != opponent:
|
if ctx.author != opponent:
|
||||||
opponent = f"#{opponent.id}"
|
opponent = f"#{opponent.id}"
|
||||||
|
|||||||
Reference in New Issue
Block a user