Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions tg_bot/modules/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,27 +327,13 @@ def adminlist(bot: Bot, update: Update):
text = "Admins in *{}*:".format(update.effective_chat.title or "this chat")
for admin in administrators:
user = admin.user
status = admin.status
name = "[{}](tg://user?id={})".format(user.first_name + " " + (user.last_name or ""), user.id)
if user.username:
name = name = escape_markdown("@" + user.username)
if status == "creator":
text += "\n 🔱 Creator:"
text += "\n` • `{} \n\n • *Administrators*:".format(name)
for admin in administrators:
user = admin.user
status = admin.status
chat = update.effective_chat
count = chat.get_members_count()
name = "[{}](tg://user?id={})".format(user.first_name + " " + (user.last_name or ""), user.id)
if user.username:
name = escape_markdown("@" + user.username)

if status == "administrator":
text += "\n`👮🏻 `{}".format(name)
members = "\n\n*Members:*\n`🙍‍♂️ ` {} users".format(count)

msg.reply_text(text + members, parse_mode=ParseMode.MARKDOWN)
msg.reply_text(text, parse_mode=ParseMode.MARKDOWN)



Expand Down