Package org.drinkless.tdlib

# Class TdApi.OpenWebApp

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.WebAppInfo>
org.drinkless.tdlib.TdApi.OpenWebApp

Enclosing class:
  `TdApi`

public static class TdApi.OpenWebApp extends TdApi.Function<TdApi.WebAppInfo>
Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once.

Returns `WebAppInfo`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `long`
  `botUserId`
  Identifier of the bot, providing the Web App.
  `long`
  `chatId`
  Identifier of the chat in which the Web App is opened.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.WebAppOpenParameters`
  `parameters`
  Parameters to use to open the Web App.
  `TdApi.InputMessageReplyTo`
  `replyTo`
  Information about the message or story to be replied in the message sent by the Web App; pass null if none.
  `TdApi.MessageTopic`
  `topicId`
  Topic in which the message will be sent; pass null if none.
  `String`
  `url`
  The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenWebApp()`
  Default constructor for a function, which informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
  `OpenWebApp(long chatId, long botUserId, String url, TdApi.MessageTopic topicId, TdApi.InputMessageReplyTo replyTo, TdApi.WebAppOpenParameters parameters)`
  Creates a function, which informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### chatId

    public long chatId
    Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats.

  - ### botUserId

    public long botUserId
    Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method.

  - ### url

    public String url
    The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.

  - ### topicId

    public TdApi.MessageTopic topicId
    Topic in which the message will be sent; pass null if none.

  - ### replyTo

    public TdApi.InputMessageReplyTo replyTo
    Information about the message or story to be replied in the message sent by the Web App; pass null if none.

  - ### parameters

    public TdApi.WebAppOpenParameters parameters
    Parameters to use to open the Web App.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### OpenWebApp

    public OpenWebApp()
    Default constructor for a function, which informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once.

    Returns `WebAppInfo`

  - ### OpenWebApp

    public OpenWebApp(long chatId, long botUserId, String url, TdApi.MessageTopic topicId, TdApi.InputMessageReplyTo replyTo, TdApi.WebAppOpenParameters parameters)
    Creates a function, which informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once.

    Returns `WebAppInfo`

    Parameters:
      `chatId` - Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats.
      `botUserId` - Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method.
      `url` - The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.
      `topicId` - Topic in which the message will be sent; pass null if none.
      `replyTo` - Information about the message or story to be replied in the message sent by the Web App; pass null if none.
      `parameters` - Parameters to use to open the Web App.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.WebAppInfo>`
    Returns:
      this.CONSTRUCTOR