rng.py 文件源码

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

项目:kitsuchan-2 作者: n303p4 项目源码 文件源码
def cat(self, ctx):
        """Fetch a random cat."""
        async with ctx.bot.session.get(URL_RANDOM_CAT_API) as response:
            if response.status == 200:
                data = await response.text()
                catto = json.loads(data)
                url = catto["file"]
                await ctx.send(url)
            else:
                await ctx.send("Could not reach random.cat. :<")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号