5 Commits

Author SHA1 Message Date
mark a2319f0fac oeps 2023-08-16 14:54:35 +02:00
mark a4ca645e3e nieuw muzak eindpunt 2023-08-16 14:53:10 +02:00
mark acb9df8616 hdcon2023 bitchesss 2023-08-02 14:25:40 +02:00
mark 1f848861e3 stroop scheldt je niet meer uit als je hem pingt.
want het was eigenlijk al een aardige tijd niet echt heel grappig meer.
2023-07-26 20:02:10 +02:00
jp ecc3ae8853 Merge pull request 'updates crypto module with newer async code' (#25) from crypto-update into master
continuous-integration/drone/push Build is passing
Reviewed-on: #25
2023-06-25 21:24:51 +02:00
3 changed files with 30 additions and 12 deletions
-1
View File
@@ -46,7 +46,6 @@ class Chatbot(commands.Cog):
"Hoi", "Hoi",
"hmm?", "hmm?",
"JA WAT?", "JA WAT?",
"Godve...Godver-fucking-domme! Wie de fuck heeft me zojuist gepingt? Wie de fuck heeft de ballen om mij te pingen?! Als ik jou vind hè, ik ram je helemaal de tyfus in. Ik ga je kapot maken. Welke breincel in jouw hoofd dacht dat het grappig was om mij te pingen? Noem jij dat 'grappig'? Ik zal je godverdomme iets laten zien wat grappig is, ja. Ik neuk je moeder zo hard dat ze van me gaat houden, godverdomme. Dat krijg je er van als je me pingt, vuile teringleijer. Jouw soort mag wat mij betreft uitsterven. Weet je, ik ga je helemaal geen aandacht meer geven. Je mag de tering krijgen, en daar blijft het bij. Kutjong.",
self.getResponseForMessageLocal("stroopwafel") self.getResponseForMessageLocal("stroopwafel")
] ]
try: try:
+24 -5
View File
@@ -5,6 +5,7 @@ import random
import re import re
import json, requests import json, requests
import warnings import warnings
from datetime import date, timedelta
from discord.ext import commands from discord.ext import commands
class General(commands.Cog): class General(commands.Cog):
@@ -12,7 +13,7 @@ class General(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
self.muzak_url = 'https://hdcon-muzak.herokuapp.com' self.muzak_url = 'https://muzak.hoekveen.net'
self.r = praw.Reddit( self.r = praw.Reddit(
user_agent='StroopwafelBot', user_agent='StroopwafelBot',
client_secret=os.getenv("STROOP_REDDIT_SECRET"), client_secret=os.getenv("STROOP_REDDIT_SECRET"),
@@ -92,11 +93,29 @@ class General(commands.Cog):
return requests.get(self.muzak_url + '/stroopwafel') return requests.get(self.muzak_url + '/stroopwafel')
@commands.command(pass_context=True) @commands.command(pass_context=True)
async def playlist(self, ctx): async def muzak(self, ctx):
"""HDcon2021 playlist""" """HD muzak playlist"""
data = json.loads(self.get_playlist_json().content) data = json.loads(self.get_playlist_json().content)
msg = 'Stemmen en nomineren kan hier: {}\n'.format(self.muzak_url) msg = ""
msg += '*Er zijn al {} nummers genomineerd*\n'.format(data['stemCount']) open = date.fromisoformat(data['openDate'])
nom = date.fromisoformat(data['deadlineNominations'])
vote = date.fromisoformat(data['deadlineVoting'])
today = date.today()
if open > today:
msg += "Het stemmen is nog niet geopend voor dit jaar.\n"
msg += f"Nog even geduld; Vanaf {open} is de muzak open en kun je naar hartelust stemmen en nomineren.\n"
elif today > nom and today > vote and (today - vote) < timedelta(days=8):
msg += "Het nomineren en stemmen is alweer voorbij.\n"
msg += "Je zult nog even geduld moeten hebben tot de lijst klaar is.\n"
elif today > nom and today > vote:
msg += "De lijst is al helemaal klaar. Goed gedaan jongens. Applausje voor jezelf."
else:
if open == today:
msg += "Jawel mensen! Vanaf vandaag mag het stemmen beginnen!\n"
msg += f"Stemmen en nomineren kan hier: {self.muzak_url}\n"
msg += f"*Er zijn al {data['stemCount']} nummers genomineerd!*\n"
msg += f"Nomineren kan tot {nom}, stemmen kan tot {vote}.\n"
msg += "\nIk hoop dat jullie allemaal je beste nummers insturen!"
await ctx.channel.send(msg) await ctx.channel.send(msg)
@commands.command(pass_context=True) @commands.command(pass_context=True)
+6 -6
View File
@@ -43,20 +43,20 @@ class Shitpost(commands.Cog):
@commands.command(pass_context=True, hidden=False) @commands.command(pass_context=True, hidden=False)
async def ishetalhdcon(self, ctx): async def ishetalhdcon(self, ctx):
"""Hoe lang nog tot Hoestende Draken Con 2022? """Hoe lang nog tot Hoestende Draken Con 2023?
Gebruik: !ishetalhdcon Gebruik: !ishetalhdcon
""" """
Now = datetime.now() Now = datetime.now()
HdConDate = datetime(2022, 10, 14, 4, 0, 1) #om 4 uur lig je toch wel al op bed? HdConDate = datetime(2023, 10, 20, 4, 0, 1) #om 4 uur lig je toch wel al op bed?
Distance = HdConDate - Now Distance = HdConDate - Now
Message = Message = "HD Con 2022 is al voorbij. HD Con 2023 zal in 2023 plaatsvinden." Message = Message = "HD Con 2023 is al voorbij. HD Con 2024 zal in 2024 plaatsvinden."
if Distance.days == -1: if Distance.days == -1:
Message = "HD Con 2022 begint vandaag! HYPE!" Message = "HD Con 2023 begint vandaag! HYPE!"
elif Distance.days < 0 and Distance.days > -4: elif Distance.days < 0 and Distance.days > -4:
Message = "HD Con 2022 is nu bezig!!" Message = "HD Con 2023 is nu bezig!!"
elif Distance.days == -4: elif Distance.days == -4:
Message = "HD Con 2022 is vandaag alweer afgelopen... F" Message = "HD Con 2023 is vandaag alweer afgelopen... F"
if Distance.days < 0: if Distance.days < 0:
await ctx.channel.send(ctx.author.mention + ' ' + str(Message)) await ctx.channel.send(ctx.author.mention + ' ' + str(Message))