approveChatJoinRequest()
Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | string | required | Unique identifier for the target chat or username of the target channel in the format @username |
user_id | number | required | Unique identifier of the target user |
returns
boolean
usage in yaebal
approveChatJoinRequest is directly typed on Api — call it straight off bot.api.
import type { ApproveChatJoinRequestParams } from "@yaebal/types";
await bot.api.approveChatJoinRequest({
chat_id: 123456789,
user_id: 123456789,
} satisfies ApproveChatJoinRequestParams);context shortcut
also available as ctx.approveChatJoinRequest() on
11
context types — see @yaebal/contexts.
/** Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can\_invite\_users* administrator right. Returns *True* on success. */
ctx.approveChatJoinRequest(params?: Omit<ApproveChatJoinRequestParams, "chat_id" | "user_id"> & { user_id?: number })official Bot API docs: https://core.telegram.org/bots/api/#approvechatjoinrequest