aboutsummaryrefslogtreecommitdiff
path: root/modules/dice.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-30 17:29:09 +0100
committerGravatar jesopo2018-09-30 17:29:09 +0100
commit10ef985a8a849a6bbfa8cbb63c2548e42ffb3957 (patch)
tree4da29ff0462ca69820d81aa95afb4b261ab3213c /modules/dice.py
parentreceived.command takes a final [command] part (diff)
signature
Switch to using docstring for usage, permission and require_mode
Diffstat (limited to 'modules/dice.py')
-rw-r--r--modules/dice.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/dice.py b/modules/dice.py
index cb48efae..ee93f570 100644
--- a/modules/dice.py
+++ b/modules/dice.py
@@ -4,10 +4,11 @@ from src import ModuleManager, Utils
ERROR_FORMAT = "Incorrect format! Format must be [number]d[number], e.g. 1d20"
class Module(ModuleManager.BaseModule):
- @Utils.hook("received.command.roll", min_args=1, usage="[1-5]d[1-20]")
+ @Utils.hook("received.command.roll", min_args=1)
def roll_dice(self, event):
"""
- Roll some dice, DND style!
+ :help: Roll some dice, DND style!
+ :usage: [1-5]d[1-20]
"""
raw_input = event["args_split"][0]
roll = raw_input.split("d")