Vanavond gaan we helemaal naar de tering

This commit is contained in:
2021-08-30 11:47:46 +02:00
parent d56ac87ee2
commit 5bda0f1b39
+25
View File
@@ -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):