Available methods

convertGiftToStars()

Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection
owned_gift_idstringrequiredUnique identifier of the regular gift that should be converted to Telegram Stars

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 { ConvertGiftToStarsParams } from "@yaebal/types";

await bot.api.call<boolean>("convertGiftToStars", {
  business_connection_id: "...",
  owned_gift_id: "...",
} satisfies ConvertGiftToStarsParams);