mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-03-03 13:00:41 +01:00
Catch an exception when dice with 0 sides are specified.
This commit is contained in:
parent
7b46f95f19
commit
1ea9fe1b4c
@ -61,6 +61,8 @@ class Games(callbacks.Plugin):
|
||||
irc.error('You can\'t roll more than 6 dice.')
|
||||
elif sides > 100:
|
||||
irc.error('Dice can\'t have more than 100 sides.')
|
||||
elif sides < 3:
|
||||
irc.error('Dice can\'t have less than 3 sides.')
|
||||
else:
|
||||
L = [0] * dice
|
||||
for i in xrange(dice):
|
||||
|
Loading…
x
Reference in New Issue
Block a user