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)
评论列表
文章目录