getChatAdministrators#

Returns: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]]

class aiogram.methods.get_chat_administrators.GetChatAdministrators(*, chat_id: Union[int, str], **extra_data: Any)[source]#

Use this method to get a list of administrators in a chat, which aren’t bots. Returns an Array of aiogram.types.chat_member.ChatMember objects.

Source: https://core.telegram.org/bots/api#getchatadministrators

chat_id: Union[int, str]#

Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)

build_request(bot: Bot) Request[source]#

Usage#

As bot method#

result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await bot.get_chat_administrators(...)

Method as object#

Imports:

  • from aiogram.methods.get_chat_administrators import GetChatAdministrators

  • alias: from aiogram.methods import GetChatAdministrators

With specific bot#

result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await bot(GetChatAdministrators(...))