From ddd772cd2afe2f93f0611def5f637aa3c136c7f6 Mon Sep 17 00:00:00 2001 From: nex Date: Fri, 10 Nov 2023 23:54:19 +0000 Subject: [PATCH] Update ollama download status --- cogs/other.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cogs/other.py b/cogs/other.py index 8244742..fa9a21a 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -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: