Laat u inspireren

In het engels dan wel, maar goed.
This commit is contained in:
Mark Hoekveen
2018-10-25 15:15:31 +02:00
parent 291358300f
commit 297623b5f1
+20
View File
@@ -155,6 +155,26 @@ class Shitpost(object):
reactie += 'Nee helaas..' reactie += 'Nee helaas..'
yield from ctx.channel.send(ctx.author.mention + ' ' + reactie) yield from ctx.channel.send(ctx.author.mention + ' ' + reactie)
@commands.command(pass_context=True, hidden=False)
@asyncio.coroutine
def inspire(self, ctx):
"""Laat je inspireren
Bijvoorbeeld:
!inspire
"""
r = requests.get(url='http://inspirobot.me/api?generate=true')
if r.status_code is 200:
url = r.text
em = discord.Embed(title='Uw wijze woorden:', type='photo')
em.set_image(url=url)
try:
yield from ctx.message.delete()
except:
print("No permission to delete message")
yield from ctx.channel.send(ctx.author.mention, embed=em)
else:
yield from ctx.channel.send(ctx.author.mention + ' helaas, geen quote gevonden.')
@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):