aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/tic_tac_toe.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/evergreen/tic_tac_toe.py')
-rw-r--r--bot/exts/evergreen/tic_tac_toe.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/evergreen/tic_tac_toe.py b/bot/exts/evergreen/tic_tac_toe.py
index e8aafa07..f1e0834b 100644
--- a/bot/exts/evergreen/tic_tac_toe.py
+++ b/bot/exts/evergreen/tic_tac_toe.py
@@ -206,6 +206,9 @@ class TicTacToe(Cog):
@command(name="tictactoe", aliases=("ttt",))
async def tic_tac_toe(self, ctx: Context, opponent: discord.User) -> None:
"""Tic Tac Toe game. Play agains friends. Use reactions to add your mark to field."""
+ if opponent == ctx.author:
+ await ctx.send("You can't play against yourself.")
+ return
if not all(
opponent not in (player.user for player in g.players) for g in ctx.cog.games if not g.over
):