base.py 文件源码

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

项目:Asurix-bot 作者: Beafantles 项目源码 文件源码
def version(self):
        """Shows bot's version"""
        python_version = str(subprocess.check_output("python --version", shell=True))[2:-5]
        python_version += " " + platform.architecture()[0][:-3] + " bits"
        commit = str(subprocess.check_output("git rev-parse HEAD", shell=True))[2:-3]
        os_infos = "Running on " + platform.platform()
        if platform.machine().endswith("64"):
            os_infos += " 64 bits"
        else:
            os_infos += " 32 bits"
        await self.bot.say("Python version: " + python_version + "\n" + \
                           "Commit: " + commit + "\n" + \
                           "Bot's version: " + self.bot.version + "\n" + \
                           "Discord's version: " + discord.__version__ + "\n" + \
                           "Environment: " + os_infos)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号