From: Thorsten Date: Sat, 29 Feb 2020 11:14:18 +0000 (+0100) Subject: trollolo X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=85691217c8e42ea6dfa9db4eeaa0d3336d2fadad;p=urlbot-v3.git trollolo --- diff --git a/distbot/plugins/fun.py b/distbot/plugins/fun.py index 34e9d5d..08bd2e6 100644 --- a/distbot/plugins/fun.py +++ b/distbot/plugins/fun.py @@ -2,6 +2,7 @@ import logging import random +import time from idna import unichr @@ -173,4 +174,14 @@ class Doctor(Worker): return Action(msg="ELIMINATE! ELIMINATE!") -ALL = [Klammer, Terminate, Unicode, Slap, Consumables, MentalDeficits, Selfreaction, Doctor] +class Sick(Worker): + binding_keys = ["nick.#", "quoted_nick.#"] + description = "omg a computer virus" + + def parse_body(self, msg): + if random.randint(0, 100) > 90: + time.sleep(random.randint(1, 5)) + return Action(msg=random.choice(["/me sneezes", "*cough*"])) + + +ALL = [Klammer, Terminate, Unicode, Slap, Consumables, MentalDeficits, Selfreaction, Doctor, Sick]