diff --git a/bot.py b/bot.py index df96ca3..2f5c6f3 100644 --- a/bot.py +++ b/bot.py @@ -2,6 +2,7 @@ import argparse import asyncio import datetime import json +import random import re import sys import traceback @@ -156,6 +157,15 @@ def keyboard(match: Match[str]) -> Response: ) +@handle_message('!still') +def cmd_still(match: Match[str]) -> Response: + _, _, msg = match.groups() + _, _, rest = msg.partition(' ') + year = datetime.date.today().year + lol = random.choice(['LOL', 'LOLW', 'LMAO', 'NUUU']) + return MessageResponse(match, f'{esc(rest)}, in {year} - {lol}!') + + class UptimeResponse(Response): async def __call__(self, config: Config) -> Optional[str]: url = f'https://api.twitch.tv/helix/streams?user_login={config.channel}' # noqa: E501