setChatAdministratorCustomTitle()
Use this method to set a custom title for an administrator in a supergroup promoted by the bot. 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 supergroup in the format @username |
user_id | number | required | Unique identifier of the target user |
custom_title | string | required | New custom title for the administrator; 0-16 characters, emoji are not allowed |
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 { SetChatAdministratorCustomTitleParams } from "@yaebal/types";
await bot.api.call<boolean>("setChatAdministratorCustomTitle", {
chat_id: 123456789,
user_id: 123456789,
custom_title: "...",
} satisfies SetChatAdministratorCustomTitleParams);context shortcut
also available as ctx.setChatAdministratorCustomTitle() on
11
context types — see @yaebal/contexts.
/** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns *True* on success. */
ctx.setChatAdministratorCustomTitle(params: Omit<SetChatAdministratorCustomTitleParams, "chat_id" | "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#setchatadministratorcustomtitle