diff --git a/Shitpost.py b/Shitpost.py index 741a7b7..a3a8a0a 100644 --- a/Shitpost.py +++ b/Shitpost.py @@ -155,6 +155,26 @@ class Shitpost(object): reactie += 'Nee helaas..' 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) @asyncio.coroutine def mark(self, ctx, boven: str, onder: str):