From c6b8e4487d6105c3e6be7b17729d1808c6177564 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 22 Oct 2018 13:13:54 +0100 Subject: Typo in help string in modules/coins.py, 'By' -> 'Buy' --- modules/coins.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/coins.py') diff --git a/modules/coins.py b/modules/coins.py index fa947323..faf0cba7 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -33,6 +33,7 @@ REGEX_STREET = re.compile("street([1-9]|1[0-2])$") WALLET_DEFAULT_NAME = "default" WALLET_DEFAULTS = {"in": WALLET_DEFAULT_NAME, "out": WALLET_DEFAULT_NAME, "interest": WALLET_DEFAULT_NAME, "lottery": WALLET_DEFAULT_NAME} + class CoinParseException(Exception): pass @@ -502,6 +503,7 @@ class Module(ModuleManager.BaseModule): if len(bet_amounts) < len(bets): raise utils.EventError("%s: Please provide an amount for each bet" % event["user"].nickname) + if len(bet_amounts) == 1 and bet_amounts[0] == "all": bet_amounts[0] = self._get_user_coins(event["user"], wallet_in) if bet_amounts[0] <= DECIMAL_ZERO: @@ -635,7 +637,7 @@ class Module(ModuleManager.BaseModule): @utils.hook("received.command.lotterybuy", authenticated=True) def lottery_buy(self, event): """ - :help: By ticket(s) for the lottery + :help: Buy ticket(s) for the lottery :usage: [amount] [wallet] """ wallet_in, _ = self._default_wallets(event["user"]) -- cgit v1.3.1-10-gc9f91