From d1a699ee467e9ea5f75c55317528f872cdc56aba Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Fri, 8 Dec 2023 20:43:13 +0100 Subject: [PATCH] vijf minuten NOS timer --- Chatbot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Chatbot.py b/Chatbot.py index 83ba5f5..3ffe377 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -20,6 +20,7 @@ class Chatbot(commands.Cog): self.START_OF_MESSAGE = "" self.pmLast = datetime(2018, 1, 1, 1, 1, 1) self.pmCount = 0 + self.nosLast = datetime(2018, 1, 1, 1, 1, 1) self.nosPosts = [] try: np.load('markov_dict.npy', allow_pickle=True) @@ -491,6 +492,11 @@ class Chatbot(commands.Cog): await ctx.message.delete() except: pass + diff = datetime.now() - self.nosLast + self.nosLast = datetime.now() + if diff.days <= 0 and diff.seconds <= 300: + await ctx.channel.send(f"Kappen nou {ctx.author.mention}") + return opties = [ "algemeen", "binnenland",