• Pay for other user's star gift upgrade.

    Note: this method is not indended to be used by full-fledged clients, as this method hides the actual invoice and payment form from the user. For GUI clients, you should refer to the method's source code and present the payment form to the user.

    Parameters

    • client: ITelegramClient
    • params: { hash: string; peer: InputPeerLike; shouldDispatch?: true }
      • hash: string

        Prepaid upgrade hash, taken from SavedStarGift.prepaidUpgradeHash

      • peer: InputPeerLike
      • OptionalshouldDispatch?: true

        Whether to dispatch the new message event to the client's update handler.

    Returns Promise<Message | null>

    Service message about the payment for the upgrade, if one was generated.