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
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | required | Unique identifier of the business connection |
show_gift_button | boolean | required | Pass 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_types | AcceptedGiftTypes | required | Types of gifts accepted by the business account |
returns
boolean
usage in yaebal
setBusinessAccountGiftSettings is directly typed on Api — call it straight off bot.api.
import type { SetBusinessAccountGiftSettingsParams } from "@yaebal/types";
await bot.api.setBusinessAccountGiftSettings({
business_connection_id: "...",
show_gift_button: true,
accepted_gift_types: {} /* AcceptedGiftTypes */,
} satisfies SetBusinessAccountGiftSettingsParams);context shortcut
also available as ctx.setBusinessAccountGiftSettings() on
4
context types — see @yaebal/contexts.
/** 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. */
ctx.setBusinessAccountGiftSettings(params: Omit<SetBusinessAccountGiftSettingsParams, "business_connection_id"> & { business_connection_id?: string })official Bot API docs: https://core.telegram.org/bots/api/#setbusinessaccountgiftsettings