getChatMember()
Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object 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 |
user_id | number | required | Unique identifier of the target user |
returns
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { ChatMember, GetChatMemberParams } from "@yaebal/types";
await bot.api.call<ChatMember>("getChatMember", {
chat_id: 123456789,
user_id: 123456789,
} satisfies GetChatMemberParams);context shortcut
also available as ctx.getChatMember() on
11
context types — see @yaebal/contexts.
/** Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a [ChatMember](https://core.telegram.org/bots/api/#chatmember) object on success. */
ctx.getChatMember(params?: Omit<GetChatMemberParams, "chat_id" | "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#getchatmember