getChatMemberCount()
Use this method to get the number of members in a chat. Returns Int on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | string | required | Unique identifier for the target chat or username of the target supergroup or channel in the format @username |
returns
number
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { GetChatMemberCountParams } from "@yaebal/types";
await bot.api.call<number>("getChatMemberCount", {
chat_id: 123456789,
} satisfies GetChatMemberCountParams);context shortcut
also available as ctx.getChatMemberCount() on
16
context types — see @yaebal/contexts.
/** Use this method to get the number of members in a chat. Returns *Int* on success. */
ctx.getChatMemberCount(params?: Omit<GetChatMemberCountParams, "chat_id">)official Bot API docs: https://core.telegram.org/bots/api/#getchatmembercount