aboutsummaryrefslogtreecommitdiffstats
path: root/warmachine/addons/standup.py
blob: a21efddcdee69915870e0d64de04195dc7976ecf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from .base import WarMachinePlugin


class StandUpPlugin(WarMachinePlugin):
    """
    WarMachine stand up plugin.

    Commands:
        !standup-add <24 hr time to kick off> <SunMTWThFSat> [channel]
        !standup-remove [channel]
    """
    async def recv_msg(self, connection, message):
        if not message['message'].startswith('!standup'):
            return

        self.log.debug('standup recv: {}'.format(message))

        cmd = message['message'].split(' ')[0]
        parts = message['message'].split(' ')[1:]

        if cmd == '!standup-add':
            await connection.say('Scheduling standup for {} on {}'.format(
                parts[1], parts[2]))

        # await connection.say('{}, {}'.format(cmd, parts), message['channel'])

    async def start_standup(self, connection):
        pass