mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-16 08:59:03 +00:00
🐛 Fix sudo list deleted user
This commit is contained in:
parent
3a9fdced62
commit
41db62feb0
@ -84,10 +84,14 @@ async def sudo_change(client: Client, message: Message):
|
||||
if len(sudo) == 0:
|
||||
return await edit_delete(message, f"__{lang('sudo_no_one')}__")
|
||||
text = f"**{lang('sudo_list')}**\n\n"
|
||||
for i in sudo:
|
||||
for i in sudo.copy():
|
||||
try:
|
||||
if i > 0:
|
||||
user = await client.get_users(i)
|
||||
if user.is_deleted:
|
||||
sudo.remove(i)
|
||||
sqlite["sudo_list"] = sudo
|
||||
continue
|
||||
text += f"• {user.mention()} - {' '.join(permissions.get_roles_for_user(str(i)))}\n"
|
||||
else:
|
||||
chat = await client.get_chat(i)
|
||||
|
@ -5,16 +5,16 @@ pytz>=2023.3
|
||||
PyYAML>=6.0
|
||||
coloredlogs>=15.0.1
|
||||
psutil>=5.8.0
|
||||
httpx==0.24.0
|
||||
httpx==0.24.1
|
||||
apscheduler>=3.10.1
|
||||
sqlitedict~=2.1.0
|
||||
casbin==1.18.2
|
||||
sentry-sdk==1.21.1
|
||||
sentry-sdk==1.23.1
|
||||
PyQRCode>=1.2.1
|
||||
PyPng
|
||||
fastapi==0.95.1
|
||||
fastapi==0.95.2
|
||||
amis-python==1.0.7
|
||||
python-jose
|
||||
uvicorn
|
||||
pydantic==1.10.7
|
||||
starlette==0.26.1
|
||||
starlette==0.27.0
|
||||
|
Loading…
Reference in New Issue
Block a user