Skip to content

Commit beb2c4a

Browse files
committed
FIX: Only creator can start the game
1 parent da1d04c commit beb2c4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ def start_cmd(bot, update):
175175
else:
176176
logger.debug("Game already existing. Starting game!")
177177
game = game_handler.get_game_by_index(game_index)
178-
game.start_game()
178+
179+
if game.players[0].user_id == user_id:
180+
game.start_game()
181+
else:
182+
bot.sendMessage(chat_id, text="Only the creator can start the game")
179183

180184

181185
def stop_cmd(bot, update):

0 commit comments

Comments
 (0)