used set.py as an example for the new usage command.
This commit is contained in:
parent
e8875ef17d
commit
efa8c91552
1 changed files with 4 additions and 2 deletions
|
@ -10,10 +10,12 @@ class Module(object):
|
||||||
bot.events.on("postboot").on("configure").on("channelset"
|
bot.events.on("postboot").on("configure").on("channelset"
|
||||||
).hook(self.postboot_channelset)
|
).hook(self.postboot_channelset)
|
||||||
bot.events.on("received").on("command").on("set").hook(
|
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"
|
bot.events.on("received").on("command").on("channelset"
|
||||||
).hook(self.channel_set, channel_only=True,
|
).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):
|
def _postboot_set(self, settings, event):
|
||||||
settings[event["setting"]] = {}
|
settings[event["setting"]] = {}
|
||||||
|
|
Loading…
Reference in a new issue