"wins/loses %d coin(s)!" instead of "wins/loses %d!"

This commit is contained in:
jesopo 2018-08-09 16:10:22 +01:00
parent e113ec23d9
commit e477e8f04f

View file

@ -94,12 +94,14 @@ class Module(object):
if win:
event["user"].set_setting("coins", user_coins+coin_bet)
event["stdout"].write("%s flips %s and wins %d!" % (
event["user"].nickname, side_name, coin_bet))
event["stdout"].write("%s flips %s and wins %d coin%s!" % (
event["user"].nickname, side_name, coin_bet,
"" if coin_bet == 1 else "s"))
else:
event["user"].set_setting("coins", user_coins-coin_bet)
event["stdout"].write("%s flips %s and loses %d!" % (
event["user"].nickname, side_name, coin_bet))
event["stdout"].write("%s flips %s and loses %d coin%s!" % (
event["user"].nickname, side_name, coin_bet,
"" if coin_bet == 1 else "s"))
def send(self, event):
send_amount = event["args_split"][1]