vijf minuten NOS timer
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-08 20:43:13 +01:00
parent acbe8c6110
commit d1a699ee46
+6
View File
@@ -20,6 +20,7 @@ class Chatbot(commands.Cog):
self.START_OF_MESSAGE = "<SOM>" self.START_OF_MESSAGE = "<SOM>"
self.pmLast = datetime(2018, 1, 1, 1, 1, 1) self.pmLast = datetime(2018, 1, 1, 1, 1, 1)
self.pmCount = 0 self.pmCount = 0
self.nosLast = datetime(2018, 1, 1, 1, 1, 1)
self.nosPosts = [] self.nosPosts = []
try: try:
np.load('markov_dict.npy', allow_pickle=True) np.load('markov_dict.npy', allow_pickle=True)
@@ -491,6 +492,11 @@ class Chatbot(commands.Cog):
await ctx.message.delete() await ctx.message.delete()
except: except:
pass 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 = [ opties = [
"algemeen", "algemeen",
"binnenland", "binnenland",