Add help/usage to factoids.py

This commit is contained in:
jesopo 2018-11-18 07:59:47 +00:00
parent 130da6f769
commit ec373cf667

View file

@ -3,6 +3,10 @@ from src import ModuleManager, utils
class Module(ModuleManager.BaseModule): class Module(ModuleManager.BaseModule):
@utils.hook("received.command.factoid", min_args=1) @utils.hook("received.command.factoid", min_args=1)
def factoid(self, event): def factoid(self, event):
"""
:help: Set/get a factoid
:usage: <key> [= value]
"""
if "=" in event["args"]: if "=" in event["args"]:
key, _, value = event["args"].partition("=") key, _, value = event["args"].partition("=")
factoid = key.lower().strip() factoid = key.lower().strip()