Available methods

setBusinessAccountGiftSettings()

Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection
show_gift_buttonbooleanrequiredPass True, if a button for sending a gift to the user or by the business account must always be shown in the input field
accepted_gift_typesAcceptedGiftTypesrequiredTypes of gifts accepted by the business account

returns

boolean

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

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

await bot.api.call<boolean>("setBusinessAccountGiftSettings", {
  business_connection_id: "...",
  show_gift_button: true,
  accepted_gift_types: {} /* AcceptedGiftTypes */,
} satisfies SetBusinessAccountGiftSettingsParams);