Bug fixes and improvements #8

Merged
profitroll merged 23 commits from dev into master 2023-01-11 17:22:34 +02:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit a4bbb837d7 - Show all commits

View File

@ -1,4 +1,5 @@
from datetime import datetime
from asyncio import sleep
from traceback import format_exc
from app import app, isAnAdmin
from typing import Any, List, Literal, Union
@ -227,6 +228,7 @@ class HoloUser():
try:
await app.promote_chat_member(configGet("users", "groups"), self.id, privileges=ChatPrivileges(can_pin_messages=True, can_manage_video_chats=True))
if not await isAnAdmin(self.id):
await sleep(0.5)
await app.set_administrator_title(configGet("users", "groups"), self.id, label)
self.set("label", label)
except Exception as exp: