From bce8fb113687e1f037e908b6514ab156d6728bb7 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Tue, 6 Apr 2021 15:11:18 +0200 Subject: [PATCH] :bug: Users that aren't the player can't end the hangman game --- funcs/games/hangman.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/funcs/games/hangman.py b/funcs/games/hangman.py index 34eb34e..0bafdbf 100644 --- a/funcs/games/hangman.py +++ b/funcs/games/hangman.py @@ -66,6 +66,8 @@ class Hangman(): if game is None: await ctx.send("There's no game going on") + elif f"#{ctx.author.id}" != game["player"]: + await ctx.send("You can't end a game you're not in") else: self.bot.database["hangman games"].delete_one({"_id":channel})