Added delay for label setting
This commit is contained in:
parent
1a438fc32e
commit
a4bbb837d7
@ -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:
|
||||
|
Reference in New Issue
Block a user