declineChatJoinRequest()
Use this method to decline 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
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { DeclineChatJoinRequestParams } from "@yaebal/types";
await bot.api.call<boolean>("declineChatJoinRequest", {
chat_id: 123456789,
user_id: 123456789,
} satisfies DeclineChatJoinRequestParams);context shortcut
also available as ctx.declineChatJoinRequest() on
11
context types — see @yaebal/contexts.
/** Use this method to decline 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.declineChatJoinRequest(params?: Omit<DeclineChatJoinRequestParams, "chat_id" | "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#declinechatjoinrequest