aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2016-04-05 18:41:33 +0100
committerGravatar jesopo2016-04-05 18:41:33 +0100
commitefa8c91552a183a5c1a1038f5ed14b94d1328b1b (patch)
tree2464eebe9591c25a22d01d88d929b9c3001598bd /modules
parentadded a usage command to show usage help for commands. (diff)
used set.py as an example for the new usage command.
Diffstat (limited to 'modules')
-rw-r--r--modules/set.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/set.py b/modules/set.py
index 456e4b5a..310efb77 100644
--- a/modules/set.py
+++ b/modules/set.py
@@ -10,10 +10,12 @@ class Module(object):
bot.events.on("postboot").on("configure").on("channelset"
).hook(self.postboot_channelset)
bot.events.on("received").on("command").on("set").hook(
- self.set, help="Set a specified user setting")
+ self.set, help="Set a specified user setting",
+ usage="<setting> <value>")
bot.events.on("received").on("command").on("channelset"
).hook(self.channel_set, channel_only=True,
- help="Set a specified setting for the current channel")
+ help="Set a specified setting for the current channel",
+ usage="<setting> <value>")
def _postboot_set(self, settings, event):
settings[event["setting"]] = {}