mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 10:03:40 +01:00
Update ollama download status
This commit is contained in:
parent
336cd4754a
commit
ddd772cd2a
1 changed files with 4 additions and 2 deletions
|
@ -1846,8 +1846,10 @@ class OtherCog(commands.Cog):
|
|||
completed = chunk["completed"] or 1 # avoid division by zero
|
||||
total = chunk["total"] or 1
|
||||
percent = round(completed / total * 100)
|
||||
if not percent % 10:
|
||||
await msg.edit(content=f"`{chunk['status']}` - {percent:.0f}%")
|
||||
if percent == 100 and completed != total:
|
||||
percent = round(completed / total * 100, 2)
|
||||
if not percent % 10 or percent >= 90.5:
|
||||
await msg.edit(content=f"`{chunk['status']}` - {percent}%")
|
||||
else:
|
||||
await msg.edit(content=f"`{chunk['status']}`")
|
||||
elif response.status_code != 200:
|
||||
|
|
Loading…
Reference in a new issue