getChatMember#

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

class aiogram.methods.get_chat_member.GetChatMember(*, chat_id: Union[int, str], user_id: int, **extra_data: Any)[source]#

Use this method to get information about a member of a chat. Returns a aiogram.types.chat_member.ChatMember object on success.

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

chat_id: Union[int, str]#

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

user_id: int#

Unique identifier of the target user

build_request(bot: Bot) Request[source]#

Usage#

As bot method#

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

Method as object#

Imports:

  • from aiogram.methods.get_chat_member import GetChatMember

  • alias: from aiogram.methods import GetChatMember

With specific bot#

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