disable xkcd link parsing, Discord does this now
@@ -54,14 +54,14 @@ class xkcdparse:
else:
await self.bot.say("I can't find that one!")
- async def on_message(self, message):
- # http://stackoverflow.com/questions/839994/extracting-a-url-in-python
- urls = re.findall(r'(https?://\S+)', message.content)
- for url in urls:
- ps = urlparse(url)
- if ps.netloc == "xkcd.com" or ps.netloc == "www.xkcd.com":
- comicnum = ps.path.replace('/', '')
- await self.bot.send_message(message.channel, embed=await self.embed_xkcd_comic(xkcd.getComic(comicnum)))
+ # async def on_message(self, message):
+ # # http://stackoverflow.com/questions/839994/extracting-a-url-in-python
+ # urls = re.findall(r'(https?://\S+)', message.content)
+ # for url in urls:
+ # ps = urlparse(url)
+ # if ps.netloc == "xkcd.com" or ps.netloc == "www.xkcd.com":
+ # comicnum = ps.path.replace('/', '')
+ # await self.bot.send_message(message.channel, embed=await self.embed_xkcd_comic(xkcd.getComic(comicnum)))
def setup(bot):
bot.add_cog(xkcdparse(bot))
