Vanavond gaan we helemaal naar de tering
This commit is contained in:
+25
@@ -255,6 +255,31 @@ class Shitpost(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
yield from ctx.channel.send(ctx.author.mention + ' helaas, geen quote gevonden.')
|
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)
|
@commands.command(pass_context=True, hidden=True)
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def mark(self, ctx, boven: str, onder: str):
|
def mark(self, ctx, boven: str, onder: str):
|
||||||
|
|||||||
Reference in New Issue
Block a user