setBusinessAccountProfilePhoto()
Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | required | Unique identifier of the business connection |
photo | InputProfilePhoto | required | The new profile photo to set |
is_public | boolean | optional | Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo. |
returns
boolean
usage in yaebal
setBusinessAccountProfilePhoto is directly typed on Api — call it straight off bot.api.
import type { SetBusinessAccountProfilePhotoParams } from "@yaebal/types";
await bot.api.setBusinessAccountProfilePhoto({
business_connection_id: "...",
photo: {} /* InputProfilePhoto */,
} satisfies SetBusinessAccountProfilePhotoParams);context shortcut
also available as ctx.setBusinessAccountProfilePhoto() on
4
context types — see @yaebal/contexts.
/** Changes the profile photo of a managed business account. Requires the *can\_edit\_profile\_photo* business bot right. Returns *True* on success. */
ctx.setBusinessAccountProfilePhoto(params: Omit<SetBusinessAccountProfilePhotoParams, "business_connection_id"> & { business_connection_id?: string })official Bot API docs: https://core.telegram.org/bots/api/#setbusinessaccountprofilephoto