diff --git a/Shitpost.py b/Shitpost.py index 797eac2..1cb1300 100644 --- a/Shitpost.py +++ b/Shitpost.py @@ -377,35 +377,6 @@ class Shitpost(commands.Cog): print("No permission to delete message") yield from ctx.channel.send(ctx.author.mention, embed=em) - @commands.command(pass_context=True) - @asyncio.coroutine - def relevantxkcd(self, ctx, query: str): - """There is always a relevant XKCD - Bijvoorbeeld: - !relevantxkcd python - """ - response = requests.get("https://relevantxkcd.appspot.com/process?action=xkcd&query=" + query) - - splitResponse = response.text.split(" ") - - if (float(splitResponse[0]) == 0.0): - yield from ctx.channel.send('Ik kan helaas geen XKCD vinden met als onderwerp "' + query + '".') - return - - photoUrl = "http://www.explainxkcd.com" + splitResponse[3] - - print(photoUrl) - - em = discord.Embed(title='', 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 + - ' een XKCD over "' + query + '"', embed=em) - @commands.command(pass_context=True, hidden=True) @asyncio.coroutine def zout(self, ctx, boven: str, onder: str):