getChatMemberCount#

Returns: int

class aiogram.methods.get_chat_member_count.GetChatMemberCount(*, chat_id: int | str, **extra_data: Any)[source]#

Use this method to get the number of members in a chat. Returns Int on success.

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

chat_id: int | str#

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

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_post_init(_ModelMetaclass__context: Any) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Usage#

As bot method#

result: int = await bot.get_chat_member_count(...)

Method as object#

Imports:

  • from aiogram.methods.get_chat_member_count import GetChatMemberCount

  • alias: from aiogram.methods import GetChatMemberCount

With specific bot#

result: int = await bot(GetChatMemberCount(...))

As shortcut from received object#