meta.py 文件源码

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

项目:Harmonbot 作者: Harmon758 项目源码 文件源码
def eval(self, ctx, *, code : str):
        code = code.strip('`')
        try:
            result = eval(code)
            if inspect.isawaitable(result):
                result = await result
            await self.bot.reply(clients.py_code_block.format(result))
        except Exception as e:
            await self.bot.reply(clients.py_code_block.format("{}: {}".format(type(e).__name__, e)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号