selfbot_goodies.py 文件源码

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

项目:goldmine 作者: Armored-Dragon 项目源码 文件源码
def render(self, ctx, *, webpage: str):
        """Render a webpage to image.
        Usage: render [url]"""
        echeck_perms(ctx, ('bot_owner',))
        await ctx.send(':warning: Not working. '
                           'Type `yes` quickly if you\'re fine with this crashing.')
        if not (await self.bot.wait_for('message', timeout=6.0,
                                        check=lambda m: m.content.lower().startswith('yes') and m.author == ctx.author and m.channel == ctx.channel)):
            return
        self.web_render = scr.Screenshot()
        image = self.web_render.capture(webpage)
        await ctx.send(file=discord.File(io.BytesIO(image), 'webpage.png'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号