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
setChatAdministratorCustomTitle is directly typed on Api — call it straight off bot.api.
import type { SetChatAdministratorCustomTitleParams } from "@yaebal/types";
await bot.api.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"> & { user_id?: number })official Bot API docs: https://core.telegram.org/bots/api/#setchatadministratorcustomtitle