Skip to content

Instantly share code, notes, and snippets.

@cognifloyd
Created April 22, 2020 04:21
Show Gist options
  • Save cognifloyd/cdffad5384a2813bc3f2bfaaa18525c5 to your computer and use it in GitHub Desktop.
Save cognifloyd/cdffad5384a2813bc3f2bfaaa18525c5 to your computer and use it in GitHub Desktop.
skills:
- name: st2_opsdroid
path: /opt/stackstorm/chatops/opsdroid-skills/st2
config:
prefix: '!'
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