aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-12 20:20:32 +0100
committerGravatar jesopo2018-10-12 20:20:32 +0100
commit59bc75988b94e8600d9802999e5d3736a0047917 (patch)
tree9d2a916988c140fe4013910436fc5e4bd9e5ce3e /modules
parentAdd !nextlottery to modules/coins.py (diff)
signature
Default !lotterybuy to 1 ticket
Diffstat (limited to 'modules')
-rw-r--r--modules/coins.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/coins.py b/modules/coins.py
index 1a101c23..2498eb85 100644
--- a/modules/coins.py
+++ b/modules/coins.py
@@ -446,7 +446,9 @@ class Module(ModuleManager.BaseModule):
:help: By ticket(s) for the lottery
:usage: [amount]
"""
- amount = event["args_split"][0]
+ amount = 1
+ if event["args_split"]:
+ amount = event["args_split"][0]
if not amount.isdigit():
event["stderr"].write("%s: Please provide a positive number "
"of tickets to buy" % event["user"].nickname)