Override scores only with positive values

This commit is contained in:
Yohann D'ANELLO 2021-11-13 20:28:40 +01:00
parent 9fcfa3f8bc
commit c271a25f21
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 3 additions and 0 deletions

View File

@ -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