setBusinessAccountName()
Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | required | Unique identifier of the business connection |
first_name | string | required | The new value of the first name for the business account; 1-64 characters |
last_name | string | optional | The new value of the last name for the business account; 0-64 characters |
returns
boolean
usage in yaebal
setBusinessAccountName is directly typed on Api — call it straight off bot.api.
import type { SetBusinessAccountNameParams } from "@yaebal/types";
await bot.api.setBusinessAccountName({
business_connection_id: "...",
first_name: "...",
} satisfies SetBusinessAccountNameParams);context shortcut
also available as ctx.setBusinessAccountName() on
4
context types — see @yaebal/contexts.
/** Changes the first and last name of a managed business account. Requires the *can\_change\_name* business bot right. Returns *True* on success. */
ctx.setBusinessAccountName(params: Omit<SetBusinessAccountNameParams, "business_connection_id"> & { business_connection_id?: string })official Bot API docs: https://core.telegram.org/bots/api/#setbusinessaccountname