add !so command

This commit is contained in:
Anthony Sottile 2020-05-23 12:36:31 -07:00
parent 213b55a3e6
commit 999057b9da
1 changed files with 9 additions and 0 deletions

9
bot.py
View File

@ -532,6 +532,15 @@ def cmd_joke(match: Match[str]) -> Response:
return MessageResponse(match, esc(pyjokes.get_joke())) return MessageResponse(match, esc(pyjokes.get_joke()))
@handle_message('!so (?P<user_channel>.+)')
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+') COMMAND_RE = re.compile(r'!\w+')
SECRET_CMDS = frozenset(('!settoday',)) SECRET_CMDS = frozenset(('!settoday',))