Maakt het makkelijker om te testen, en is sowieso betere manier denk ik
This commit is contained in:
+9
-9
@@ -27,7 +27,7 @@ class Shitpost(commands.Cog):
|
||||
'knoeier','sufferd','slaapkop','onbenul','enorme nerf herder','geinponem',
|
||||
'clownsfiguur','krotenkoker','hansworst','grappenmaker','flapdrol','oen',
|
||||
'achterlijk gebakje','demente dibbes','geitenbreier','koekwous','sufkop']
|
||||
self.caldav_client = caldav.DAVClient(url=self.bot.tokens['caldav_url'])
|
||||
self.caldav_client = caldav.DAVClient(url=os.getenv('STROOP_CALDAV_HOST'))
|
||||
|
||||
def __check(self, ctx): #Todo: Is dit het shitpost kanaal?
|
||||
return True
|
||||
@@ -218,7 +218,7 @@ class Shitpost(commands.Cog):
|
||||
Ja of Nee.. kom op nou.
|
||||
"""
|
||||
#We halen dit op van de twitter account @gietitaloan die vertrouwen wij als de ultieme waarheid
|
||||
consumer = oauth.Consumer(key=self.bot.tokens["twitterKey"], secret=self.bot.tokens["twitterSecret"])
|
||||
consumer = oauth.Consumer(key=os.getenv('STROOP_TWITTER_KEY'), secret=os.getenv('STROOP_TWITTER_SECRET'))
|
||||
client = oauth.Client(consumer)
|
||||
resp, content = client.request("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=gietitaloan&count=1", "GET")
|
||||
#TODO kijken of resp iets zinnigs teruggeeft.. of iets doen met een try of catch ofzow
|
||||
@@ -266,7 +266,7 @@ class Shitpost(commands.Cog):
|
||||
params = dict(
|
||||
template_id = '78416340', #party hard
|
||||
username = 'Stroopwafel',
|
||||
password = self.bot.passwords["imgflip"],
|
||||
password = os.getenv("STROOP_IMGFLIP_PASSWORD"),
|
||||
text0 = boven,
|
||||
text1 = onder
|
||||
)
|
||||
@@ -291,7 +291,7 @@ class Shitpost(commands.Cog):
|
||||
params = dict(
|
||||
template_id = '112898841', #de marku
|
||||
username = 'Stroopwafel',
|
||||
password = self.bot.passwords["imgflip"],
|
||||
password = os.getenv("STROOP_IMGFLIP_PASSWORD"),
|
||||
text0 = boven,
|
||||
text1 = onder
|
||||
)
|
||||
@@ -317,7 +317,7 @@ class Shitpost(commands.Cog):
|
||||
params = dict(
|
||||
template_id = '93296473', #de eriku
|
||||
username = 'Stroopwafel',
|
||||
password = self.bot.passwords["imgflip"],
|
||||
password = os.getenv('STROOP_IMGFLIP_PASSWORD'),
|
||||
text0 = boven,
|
||||
text1 = onder
|
||||
)
|
||||
@@ -344,7 +344,7 @@ class Shitpost(commands.Cog):
|
||||
params = {
|
||||
'template_id': '121572521', #delfts blauw
|
||||
'username': 'Stroopwafel',
|
||||
'password': self.bot.passwords["imgflip"],
|
||||
'password': os.getenv('STROOP_IMGFLIP_PASSWORD'),
|
||||
'text0': 'dummy0',
|
||||
'text1': 'dummy1',
|
||||
'font': 'arial',
|
||||
@@ -417,7 +417,7 @@ class Shitpost(commands.Cog):
|
||||
params = dict(
|
||||
template_id = '116231806', #de martijn
|
||||
username = 'Stroopwafel',
|
||||
password = self.bot.passwords["imgflip"],
|
||||
password = os.getenv('STROOP_IMGFLIP_PASSWORD'),
|
||||
text0 = boven,
|
||||
text1 = onder
|
||||
)
|
||||
@@ -545,7 +545,7 @@ class Shitpost(commands.Cog):
|
||||
else:
|
||||
v = True
|
||||
|
||||
url = f"http://weerlive.nl/api/json-data-10min.php?key={self.bot.tokens['weerLive']}&locatie={location}"
|
||||
url = f"http://weerlive.nl/api/json-data-10min.php?key={os.getenv('STROOP_WEERLIVE')}&locatie={location}"
|
||||
response = requests.get(url)
|
||||
#Oant Moarn
|
||||
|
||||
@@ -710,7 +710,7 @@ class Shitpost(commands.Cog):
|
||||
|
||||
def watspelenweecht(self):
|
||||
"""Geeft een paar terug, met de titel en omschrijving van het eerstvolgende event uit de kalender"""
|
||||
calendar = self.caldav_client.calendar(url=self.bot.tokens["calendar"]) # refresh kalender
|
||||
calendar = self.caldav_client.calendar(url=os.getenv('STROOP_CALDAV_CAL')) # refresh kalender
|
||||
|
||||
# geen errorchecking hier, de caller doet dat maar gewoon ofzo, yolo
|
||||
events = calendar.date_search(
|
||||
|
||||
Reference in New Issue
Block a user