From 6fade5cf3827394bc2d9381822c486c4035a47ec Mon Sep 17 00:00:00 2001 From: JP Date: Wed, 11 Sep 2019 21:13:01 +0200 Subject: [PATCH] That's Numberwang! --- Chatbot.py | 3 +++ README.md | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 8f6bb91..4898dd9 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -40,6 +40,9 @@ class Chatbot(object): if message.content.lower() == "lol": yield from message.channel.send("laffing aut laut") return + if re.match("^[0-9][0-9.,]*$", message.content.strip()) and random.randint(0,9) == 0: + yield from message.channel.send("That's Numberwang!") # https://www.youtube.com/watch?v=0obMRztklqU + return if "DMChannel" in type(message.channel).__name__: #respond to messages in PM channels if (self.isAllowedToLearnFromPm(message)): #avoid spam-learning self.pmCount += 1 diff --git a/README.md b/README.md index 1391686..28500b5 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,5 @@ Verder zoek je het maar lekker zelf uit. Of installeer deze requirements: * `asyncio` * `numpy` * `youtube_dl` -* `ffmpeg-python` \ No newline at end of file +* `ffmpeg-python` +* `spotipy` \ No newline at end of file