Available methods

verifyChat()

Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.

parameters

parametertyperequireddescription
chat_idnumber | stringrequiredUnique identifier for the target chat or username of the target bot, supergroup or channel in the format @username. Channel direct messages chats can't be verified.
custom_descriptionstringoptionalCustom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.

returns

boolean

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { VerifyChatParams } from "@yaebal/types";

await bot.api.call<boolean>("verifyChat", {
  chat_id: 123456789,
} satisfies VerifyChatParams);

context shortcut

also available as ctx.verifyChat() on 16 context types — see @yaebal/contexts.

context shortcut
/** Verifies a chat [on behalf of the organization](https://telegram.org/verify#third-party-verification) which is represented by the bot. Returns *True* on success. */
ctx.verifyChat(params: Omit<VerifyChatParams, "chat_id">)