From 5bda0f1b39ccb73054498b0c7bd41f2c5133fba3 Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Mon, 30 Aug 2021 11:47:46 +0200 Subject: [PATCH] Vanavond gaan we helemaal naar de tering --- Shitpost.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Shitpost.py b/Shitpost.py index 9e92a62..6655295 100644 --- a/Shitpost.py +++ b/Shitpost.py @@ -255,6 +255,31 @@ class Shitpost(commands.Cog): else: yield from ctx.channel.send(ctx.author.mention + ' helaas, geen quote gevonden.') + @commands.command(pass_context=True, hidden=True) + @asyncio.coroutine + def tering(self, ctx, boven: str, onder: str): + """Vanavond gaan we helemaal naar de tering + Bijvoorbeeld: + !tering \"Vanavond\" \"gaan we helemaal naar de tering\" + """ + params = dict( + template_id = '78416340', #party hard + username = 'Stroopwafel', + password = self.bot.passwords["imgflip"], + text0 = boven, + text1 = onder + ) + resp = requests.get(url='https://api.imgflip.com/caption_image', params=params) + #todo check for success + photourl = resp.json()['data']['url'] + em = discord.Embed(type='photo') + em.set_image(url=photourl) + try: + yield from ctx.message.delete() + except: + print("No permission to delete message") + yield from ctx.channel.send(ctx.author.mention, embed=em) + @commands.command(pass_context=True, hidden=True) @asyncio.coroutine def mark(self, ctx, boven: str, onder: str):