--- a/rollbot.py Sun May 22 21:48:18 2016 +0800
+++ b/rollbot.py Fri Jun 03 11:23:45 2016 +0800
sides = match.group('sides')
- rolls, total = self.roll(int(times), int(sides))
- return self.format(rolls, total)
+ if times > 0 and sides > 1:
+ rolls, total = self.roll(int(times), int(sides))
+ return self.format(rolls, total)
return '%s usage: %s' % (self.name, self.usage())