From 999057b9da5ae4d620a82e60434edaea683af883 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 23 May 2020 12:36:31 -0700 Subject: [PATCH] add !so command --- bot.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bot.py b/bot.py index d6dda62..b67c9a9 100644 --- a/bot.py +++ b/bot.py @@ -532,6 +532,15 @@ def cmd_joke(match: Match[str]) -> Response: return MessageResponse(match, esc(pyjokes.get_joke())) +@handle_message('!so (?P.+)') +def cmd_shoutout(match: Match[str]) -> Response: + user = match['user_channel'] + return MessageResponse( + match, + f'you should check out https://twitch.tv/{esc(user)}!', + ) + + COMMAND_RE = re.compile(r'!\w+') SECRET_CMDS = frozenset(('!settoday',))