peyk.platforms.telegram.methods.get_chat_administrators

async peyk.platforms.telegram.methods.get_chat_administrators(self, chat_id: int | str, *, return_bots: bool | None = None) List[ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned][source]

Use this method to get a list of administrators in a chat. Returns an Array of ChatMember objects.

Parameters:
  • chat_id – Unique identifier for the target chat or username of the target supergroup or channel in the format @username

  • return_bots – Pass True to additionally receive all bots that are administrators of the chat. By default, bots other than the current bot are omitted.

Returns:

Result returned by Telegram on successful execution.

Return type:

List[ChatMember]