From 1fa72d5753eec542e0f9e7cd6546756917985656 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 13 Jul 2019 16:37:25 -0700 Subject: [PATCH] Add !keyboard and !keyboard2 --- bot.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bot.py b/bot.py index 7a36fb8..64330b3 100644 --- a/bot.py +++ b/bot.py @@ -133,6 +133,24 @@ def cmd_discord(match: Match[str]) -> Response: ) +@handle_message('!keyboard2') +def keyboard2(match: Match[str]) -> Response: + return MessageResponse( + match, + 'this is my second mechanical keyboard: ' + 'https://i.fluffy.cc/CDtRzWX1JZTbqzKswHrZsF7HPX2zfLL1.png', + ) + + +@handle_message('!keyboard') +def keyboard(match: Match[str]) -> Response: + return MessageResponse( + match, + 'this is my streaming keyboard (contributed by PhillipWei): ' + 'http://www.wasdkeyboards.com/index.php/products/mechanical-keyboard/wasd-v3-87-key-custom-mechanical-keyboard.html', # noqa: E501 + ) + + 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