stroop praat vaker terug als je het over hem hebt
This commit is contained in:
+5
-3
@@ -49,12 +49,14 @@ class Chatbot(object):
|
|||||||
elif message.channel.id == self.bot.hdChannels["belangrijk"]: #don't abuse the "belangrijk" channel
|
elif message.channel.id == self.bot.hdChannels["belangrijk"]: #don't abuse the "belangrijk" channel
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
a = random.randint(0,999)
|
a = random.randint(0,999) # probablity
|
||||||
if message.channel.id == self.bot.hdChannels["shitpost"] and a < 40: #shitpost channel
|
if a < 40:
|
||||||
yield from self.learnFromMessagesInChannel(message.channel.id, 10)
|
yield from self.learnFromMessagesInChannel(message.channel.id, 10)
|
||||||
|
if "stroop" in message.content.lower():
|
||||||
|
a = a / 20 # significantly increase the chance of responding if somebody talks about him.
|
||||||
|
if message.channel.id == self.bot.hdChannels["shitpost"] and a < 40: #shitpost channel
|
||||||
yield from self.respondToMessage(message)
|
yield from self.respondToMessage(message)
|
||||||
elif a < 10: #all other channels
|
elif a < 10: #all other channels
|
||||||
yield from self.learnFromMessagesInChannel(message.channel.id, 20)
|
|
||||||
yield from self.respondToMessage(message)
|
yield from self.respondToMessage(message)
|
||||||
|
|
||||||
#process commands:
|
#process commands:
|
||||||
|
|||||||
Reference in New Issue
Block a user