leaveChat
Returns boolean ↗
Use this method for your bot to leave a group, supergroup or channel.
Required: chat_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("leave_chat", { chat_id: "YOUR_CHAT_ID"})Parameters
chat_id number | string Required
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername). Channel direct messages chats aren’t supported; leave the corresponding channel instead.