From c271a25f210b71e4d5d3ef5eac027efb71afab5a Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 13 Nov 2021 20:28:40 +0100 Subject: [PATCH] Override scores only with positive values --- orochi/bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/orochi/bot.py b/orochi/bot.py index 63f1dae..3fa23ef 100644 --- a/orochi/bot.py +++ b/orochi/bot.py @@ -469,6 +469,9 @@ async def override(ctx: commands.Context, player_name: str, target_score: int): """ game: Game = Game.INSTANCE + if target_score <= 0: + return await ctx.reply("Le score désiré doit valoir au moins 1.") + for player in game.players.values(): if player.name.lower() == player_name.lower(): current_player = player