admin.py 文件源码

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

项目:goldmine 作者: Armored-Dragon 项目源码 文件源码
def progress(self, msg: discord.Message, begin_txt: str):
        """Play loading animation with dots and moon."""
        fmt = '{0}{1} {2}'
        anim = '????????????????????'
        anim_len = len(anim) - 1
        anim_i = 0
        dot_i = 1
        while True:
            await msg.edit(content=fmt.format(begin_txt, ('.' * dot_i) + ' ' * (3 - dot_i), anim[anim_i]))
            dot_i += 1
            if dot_i > 3:
                dot_i = 1
            anim_i += 1
            if anim_i > anim_len:
                anim_i = 0
            await asyncio.sleep(1.1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号