• Send a star gift to a user.

    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: {
          anonymous?: boolean;
          gift: Long | StarGift;
          message?: InputText;
          shouldDispatch?: true;
          userId: InputPeerLike;
      }
      • Optionalanonymous?: boolean

        Whether to send the gift anonymously (i.e. if the recipient chooses to display the gift on their profile, your name won't be visible)

      • gift: Long | StarGift

        ID of the gift to send

      • Optionalmessage?: InputText

        Message to send along with the gift

      • OptionalshouldDispatch?: true

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

      • userId: InputPeerLike

        ID of the user to send the gift to

    Returns Promise<Message>

    Service message about the sent gift