add spec arg names to echo.py

This commit is contained in:
jesopo 2020-01-26 11:25:27 +00:00
parent 23d3ba5e29
commit 211bcc70a8

View file

@ -6,14 +6,14 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.command.echo")
@utils.kwarg("remove_empty", False)
@utils.kwarg("help", "Echo a string back")
@utils.spec("!string")
@utils.spec("!<message>string")
def echo(self, event):
event["stdout"].write(event["spec"][0])
@utils.hook("received.command.action")
@utils.kwarg("remove_empty", False)
@utils.kwarg("help", "Make the bot send a /me")
@utils.spec("!string")
@utils.spec("!<message>string")
def action(self, event):
event["target"].send_message("\x01ACTION %s\x01" % event["spec"][0])
@ -21,6 +21,6 @@ class Module(ModuleManager.BaseModule):
@utils.kwarg("permission", "say")
@utils.kwarg("remove_empty", False)
@utils.kwarg("help", "Send a message to a target")
@utils.spec("!word !string")
@utils.spec("!<target>word !<message>string")
def msg(self, event):
event["server"].send_message(event["spec"][0], event["spec"][1])