mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fix
This commit is contained in:
parent
7838305719
commit
27433f3e4f
2 changed files with 6 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ from psutil import virtual_memory, cpu_count, boot_time, net_io_counters
|
|||
from pyrogram import enums, filters, Client, __version__ as pyrover
|
||||
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message, InputMediaPhoto
|
||||
from pyrogram.raw.types import UpdateBotStopped
|
||||
from pyrogram.errors import PeerIdInvalid
|
||||
from pyrogram.errors import PeerIdInvalid, FloodWait
|
||||
from pykeyboard import InlineKeyboard, InlineButton
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
|
|
|
|||
|
|
@ -233,12 +233,14 @@ async def adminlist(_, message):
|
|||
if message.chat.type == enums.ChatType.PRIVATE:
|
||||
return await message.reply("Perintah ini hanya untuk grup")
|
||||
try:
|
||||
msg = await m.reply_msg(f"Getting admin list in {message.chat.title}..")
|
||||
administrators = []
|
||||
async for m in app.get_chat_members(message.chat.id, filter=enums.ChatMembersFilter.ADMINISTRATORS):
|
||||
administrators.append(f"{m.user.first_name}")
|
||||
uname = f"@{m.user.username}" if m.user.username else ""
|
||||
administrators.append(f"{m.user.first_name} [{uname}]")
|
||||
|
||||
res = "".join(f"~ {i}\n" for i in administrators)
|
||||
return await message.reply(f"Daftar Admin di <b>{message.chat.title}</b> ({message.chat.id}):\n~ {res}")
|
||||
res = "".join(f"💠 {i}\n" for i in administrators)
|
||||
return await msg.edit_msg(f"Admin in <b>{message.chat.title}</b> ({message.chat.id}):\n{res}")
|
||||
except Exception as e:
|
||||
await message.reply(f"ERROR: {str(e)}")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue