From 91a456d7e1b76310739a1ecca544e6871d551de9 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Mon, 16 Apr 2018 16:50:39 -0700 Subject: [PATCH] give partybot a drink --- partybot-matrix.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/partybot-matrix.py b/partybot-matrix.py index 491357b..0da8234 100644 --- a/partybot-matrix.py +++ b/partybot-matrix.py @@ -21,11 +21,29 @@ def botsnack_cb(room, event): "How kind!", "Sweet.", "*burp*", + ] + room.send_notice(random.choice(replies)) + + +def botdrink_cb(room, event): + replies = [ + "Hold my beer.", + "Ooooh", + "Delightful.", + "That makes me happy", + "How kind!", + "Sweet.", + "*burp*", "Ah.. Hiccup!" ] room.send_notice(random.choice(replies)) +def metal_cb(room, event): + logging.debug(event) + logging.debug("\m/") + room.send_notice("\m/") + def show_karma_cb(room, event): allkkeys = rs.keys("partybot:k_" + event['room_id'] + "@*") @@ -117,6 +135,8 @@ if __name__ == "__main__": bot.add_handler(MRegexHandler("([\w]+)\s?(\-\-|\+\+)", karma_cb)) bot.add_handler(MCommandHandler("karma", show_karma_cb)) bot.add_handler(MCommandHandler("botsnack", botsnack_cb)) + bot.add_handler(MCommandHandler("botdrink", botdrink_cb)) + bot.add_handler(MRegexHandler("\s?\\m\/\s?", metal_cb)) bot.start_polling()