aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/tic_tac_toe.py
diff options
context:
space:
mode:
authorGravatar Chris <[email protected]>2021-03-14 13:30:27 +0000
committerGravatar Chris <[email protected]>2021-03-14 13:30:27 +0000
commit84930e02690051d3e05fdb3c489f25159b25bf03 (patch)
tree70dc3a91ef0060e6344b3bf19ebe0b7051ee9145 /bot/exts/evergreen/tic_tac_toe.py
parentUse new help command ext (diff)
parentUse .gitattributes to normalise line endings on check-in (diff)
Merge remote-tracking branch 'origin/main' into Enforce-image-processing-concurrency
Diffstat (limited to 'bot/exts/evergreen/tic_tac_toe.py')
-rw-r--r--bot/exts/evergreen/tic_tac_toe.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/bot/exts/evergreen/tic_tac_toe.py b/bot/exts/evergreen/tic_tac_toe.py
index e1190502..6e21528e 100644
--- a/bot/exts/evergreen/tic_tac_toe.py
+++ b/bot/exts/evergreen/tic_tac_toe.py
@@ -10,8 +10,8 @@ from bot.constants import Emojis
from bot.utils.pagination import LinePaginator
CONFIRMATION_MESSAGE = (
- "{opponent}, {requester} wants to play Tic-Tac-Toe against you. React to this message with "
- f"{Emojis.confirmation} to accept or with {Emojis.decline} to decline."
+ "{opponent}, {requester} wants to play Tic-Tac-Toe against you."
+ f"\nReact to this message with {Emojis.confirmation} to accept or with {Emojis.decline} to decline."
)
@@ -253,7 +253,7 @@ class TicTacToe(Cog):
@guild_only()
@is_channel_free()
@is_requester_free()
- @group(name="tictactoe", aliases=("ttt",), invoke_without_command=True)
+ @group(name="tictactoe", aliases=("ttt", "tic"), invoke_without_command=True)
async def tic_tac_toe(self, ctx: Context, opponent: t.Optional[discord.User]) -> None:
"""Tic Tac Toe game. Play against friends or AI. Use reactions to add your mark to field."""
if opponent == ctx.author:
@@ -276,6 +276,10 @@ class TicTacToe(Cog):
)
self.games.append(game)
if opponent is not None:
+ if opponent.bot: # check whether the opponent is a bot or not
+ await ctx.send("You can't play Tic-Tac-Toe with bots!")
+ return
+
confirmed, msg = await game.get_confirmation()
if not confirmed: