small fix on previous commit
This commit is contained in:
+13
-10
@@ -27,6 +27,7 @@ class Shitpost(object):
|
||||
"""Hoe lang nog tot Hoestende Dranken Con 2018?
|
||||
Gebruik: !ishetalhdcon
|
||||
"""
|
||||
|
||||
#year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
|
||||
Now = datetime.now()
|
||||
HdConDate = datetime(2018, 9, 14, 4, 0, 1) #om 4 uur lig je toch wel al op bed?
|
||||
@@ -61,7 +62,8 @@ class Shitpost(object):
|
||||
eventsMinutesAgoSameAuthor +=1
|
||||
if eventDistance.days < 2:
|
||||
eventsLastDays += 1
|
||||
self.hdConImpatientEvents.append([ctx.author.id, Now])
|
||||
if not "DMChannel" in type(ctx.channel).__name__: #ignore personal chats
|
||||
self.hdConImpatientEvents.append([ctx.author.id, Now])
|
||||
|
||||
#Als dezelfde persoon het blijft vragen pikken we het niet:
|
||||
if eventsMinutesAgoSameAuthor > 3:
|
||||
@@ -73,15 +75,16 @@ class Shitpost(object):
|
||||
yield from ctx.channel.send("Dat vroeg je net ook al, " + ctx.author.mention + "!")
|
||||
return
|
||||
#Hoe vaker er wordt gevraagd, hoe ongeduldiger de antwoorden:
|
||||
impatientFactor = 10 + eventsMinutesAgo*25 + eventsLastDays*10;
|
||||
impatientFactor *= random.random()
|
||||
if impatientFactor > 100:
|
||||
yield from ctx.channel.send("Nee!")
|
||||
return
|
||||
elif impatientFactor > 15 and eventsMinutesAgo > 0:
|
||||
Message = "Dat hebben jullie net gevraagd."
|
||||
elif impatientFactor > 9:
|
||||
Message = "Nee."
|
||||
if not "DMChannel" in type(ctx.channel).__name__: #ignore personal chats
|
||||
impatientFactor = 10 + eventsMinutesAgo*25 + eventsLastDays*10;
|
||||
impatientFactor *= random.random()
|
||||
if impatientFactor > 100:
|
||||
yield from ctx.channel.send("Nee!")
|
||||
return
|
||||
elif impatientFactor > 15 and eventsMinutesAgo > 0:
|
||||
Message = "Dat hebben jullie net gevraagd."
|
||||
elif impatientFactor > 9:
|
||||
Message = "Nee."
|
||||
|
||||
yield from ctx.channel.send(ctx.author.mention + ' ' + str(Message))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user