owner.py 文件源码

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

项目:goldmine 作者: Armored-Dragon 项目源码 文件源码
def restart(self, ctx):
        """Restarts this bot.
        Usage: restart"""
        echeck_perms(ctx, ('bot_owner',))
        self.bot.store_writer.cancel()
        await self.bot.store.commit()
        if ctx.invoked_with != 'update':
            await ctx.send('I\'ll try to restart. Hopefully I come back alive :stuck_out_tongue:')
        self.logger.info('The bot is now restarting!')
        # self.bot.is_restart = True
        os.execl(sys.executable, sys.executable, *sys.argv)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号