Available methods

removeBusinessAccountProfilePhoto()

Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection
is_publicbooleanoptionalPass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.

returns

boolean

usage in yaebal

removeBusinessAccountProfilePhoto is directly typed on Api — call it straight off bot.api.

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

await bot.api.removeBusinessAccountProfilePhoto({
  business_connection_id: "...",
} satisfies RemoveBusinessAccountProfilePhotoParams);

context shortcut

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

context shortcut
/** Removes the current profile photo of a managed business account. Requires the *can\_edit\_profile\_photo* business bot right. Returns *True* on success. */
ctx.removeBusinessAccountProfilePhoto(params: Omit<RemoveBusinessAccountProfilePhotoParams, "business_connection_id"> & { business_connection_id?: string })