From 4715ab14e23c65d2156222eb2a9ce0b168a5223c Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 14 Dec 2017 16:28:07 +0000 Subject: [PATCH] Add more variety and eastereggs to "+1 yourself" --- plusone.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plusone.py b/plusone.py index cb6f831..bd00477 100644 --- a/plusone.py +++ b/plusone.py @@ -1,6 +1,7 @@ import yaboli from yaboli.utils import * import asyncio +import random import re import sys @@ -80,7 +81,15 @@ class PlusOne(yaboli.Bot): if nick is None: await self.room.send("You can't +1 nothing...", message.mid) elif similar(nick, message.sender.nick): - await self.room.send("Don't +1 yourself, that's... It just doesn't work that way, alright?", message.mid) + newtext = random.choice([ + "Don't +1 yourself, that's... nasty.", + "Don't +1 yourself, that's... It just doesn't work that way, alright?", + "No points for " + nick + "!", + "No", # Attempt to trigger @Elements + "Would you kindly stop that?", + "Where'd you get that idea from? It would never work." + ]) + await self.room.send(newtext, message.mid) else: await self.db.add_point(nick) await self.room.send(f"Point for user {mention(nick)} registered.", message.mid)