jarvis-server-v2/jarvis/skills/decorators.py
2022-12-01 16:06:23 +01:00

27 lines
489 B
Python

def intent_handler(*args):
"""
Creates an attribute on the method, so it can
be discovered by the metaclass
"""
def decorator(f):
f._type = "adapt"
f._data = args
return f
return decorator
def intent_file_handler(*args):
"""
Creates an attribute on the method, so it can
be discovered by the metaclass
"""
def decorator(f):
f._type = "padatious"
f._data = args
return f
return decorator