declineChatJoinRequest
Returns boolean ↗
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.
Required: chat_id, user_id
Try it
TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("decline_chat_join_request", { chat_id: "YOUR_CHAT_ID", user_id: 0})Parameters
chat_id number | string Required
Unique identifier for the target chat or username of the target channel (in the format @channelusername).
user_id number Required
Unique identifier of the target user.