Created
April 22, 2020 04:21
-
-
Save cognifloyd/cdffad5384a2813bc3f2bfaaa18525c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
skills: | |
- name: st2_opsdroid | |
path: /opt/stackstorm/chatops/opsdroid-skills/st2 | |
config: | |
prefix: '!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from opsdroid.skill import Skill | |
from opsdroid.matchers import match_regex | |
class StackStormSkill(Skill): | |
def __init__(self, opsdroid, config): | |
self._prefix = config['prefix'] | |
def match_prefix(self, func): | |
return match_regex(self._prefix)(func) | |
@match_prefix | |
async def action_alias(self, message): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment