Module tdlight.api

Class TdApi.OpenWebApp

Enclosing class:
TdApi

public static final 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

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Short name of the application; 0-64 English letters, digits, and underscores.
    long
    Identifier of the bot, providing the Web App.
    long
    Identifier of the chat in which the Web App is opened.
    static final int
    Identifier uniquely determining type of the object.
    long
    If not 0, the message thread identifier in which the message will be sent.
    Information about the message or story to be replied in the message sent by the Web App; pass null if none.
    Preferred Web App theme; pass null to use the default theme.
    The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.ThemeParameters theme, String applicationName, long messageThreadId, TdApi.InputMessageReplyTo replyTo)
    Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
    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
    boolean
     
    int
    Returns an identifier uniquely determining type of the object.
    int
     
    void
    Serialize the TDLib class

    Methods inherited from class it.tdlight.jni.TdApi.Function

    toString

    Methods inherited from class it.tdlight.jni.TdApi.Object

    serialize

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, 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.
    • url

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

      public TdApi.ThemeParameters theme
      Preferred Web App theme; pass null to use the default theme.
    • applicationName

      public String applicationName
      Short name of the application; 0-64 English letters, digits, and underscores.
    • messageThreadId

      public long messageThreadId
      If not 0, the message thread identifier in which the message will be sent.
    • 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.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • OpenWebApp

      public OpenWebApp()
      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.ThemeParameters theme, String applicationName, long messageThreadId, TdApi.InputMessageReplyTo replyTo)
      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.
      url - The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.
      theme - Preferred Web App theme; pass null to use the default theme.
      applicationName - Short name of the application; 0-64 English letters, digits, and underscores.
      messageThreadId - If not 0, the message thread identifier in which the message will be sent.
      replyTo - Information about the message or story to be replied in the message sent by the Web App; pass null if none.

      Returns WebAppInfo

    • OpenWebApp

      public OpenWebApp(DataInput input) throws IOException
      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:
      input - Serialized input
      Throws:
      IOException - the deserialization failed
  • 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.Object
      Returns:
      this.CONSTRUCTOR
    • serialize

      public void serialize(DataOutput output) throws IOException
      Serialize the TDLib class
      Specified by:
      serialize in class TdApi.Object
      Parameters:
      output - output data stream
      Throws:
      IOException - the serialization failed
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object