Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @dataclass
- class Command(object):
- validator = None
- input: list
- channel: str
- @classmethod
- def recognize(cls, event):
- return re.findall(re.compile(cls.validator), event['text'])
- def do(self):
- raise NotImplementedError()
- class HelpCommand(Command):
- validator = 'help'
- def do(self):
- slack_client.api_call(
- "chat.postMessage",
- channel=self.channel,
- text="""
- Here are some things I can do:
- - type help to see this message
- - type "Standup for: <comma separated members list>" to start recording the standup
- """
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement