haal channels uit dotenv
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-03-18 23:01:11 +01:00
parent a80ac831f0
commit a142b299f4
+2 -3
View File
@@ -4,6 +4,7 @@ import numpy as np
import random
import requests
import asyncio
import os
from datetime import datetime
import re
@@ -63,15 +64,13 @@ class Chatbot(commands.Cog):
self.pmLast = datetime.now()
await self.learnFromMessagesInChannel(message.channel, 1)
await self.respondToMessage(message)
elif message.channel.id == self.bot.hdChannels["belangrijk"]: #don't abuse the "belangrijk" channel
pass
else:
a = random.randint(0,999) # probablity
if a < 40:
await self.learnFromMessagesInChannel(message.channel, 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
if message.channel.id == os.getenv('STROOP_CHANNEL_SHITPOST') and a < 40: #shitpost channel
await self.respondToMessage(message)
elif a < 10: #all other channels
await self.respondToMessage(message)