Cats.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:CorpBot.py 作者: corpnewt 项目源码 文件源码
def randomcat(self, ctx):
        """Meow."""

        channel = ctx.message.channel
        author  = ctx.message.author
        server  = ctx.message.server

        if not self.canDisplay(server):
            return

        url = 'http://random.cat/meow'

        # Grab our image url
        r = requests.get(url, headers = {'User-agent': self.ua})

        catURL = r.json()['file']

        await GetImage.get(catURL, self.bot, channel, 'A cat for you!', self.ua)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号