minerbot-phoenix/plugin.py

17 lines
310 B
Python
Raw Normal View History

2018-12-09 17:53:44 +00:00
cmds = {}
help = {}
2018-12-15 04:36:52 +00:00
listeners = {}
2018-12-09 17:53:44 +00:00
def command(name,helptext="No help available for this command."):
def _register_cmd(func):
cmds[name]=func
help[name]=helptext
return func
return _register_cmd
2018-12-15 04:36:52 +00:00
def listener(name):
def _register_cmd(func):
listeners[name]=func
return func
return _register_cmd