Override scores only with positive values
This commit is contained in:
parent
9fcfa3f8bc
commit
c271a25f21
|
@ -469,6 +469,9 @@ async def override(ctx: commands.Context, player_name: str, target_score: int):
|
||||||
"""
|
"""
|
||||||
game: Game = Game.INSTANCE
|
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():
|
for player in game.players.values():
|
||||||
if player.name.lower() == player_name.lower():
|
if player.name.lower() == player_name.lower():
|
||||||
current_player = player
|
current_player = player
|
||||||
|
|
Loading…
Reference in New Issue