Package org.drinkless.tdlib

# Class TdApi.InternalLinkTypeMainWebApp

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.InternalLinkType
org.drinkless.tdlib.TdApi.InternalLinkTypeMainWebApp

Enclosing class:
  `TdApi`

public static class TdApi.InternalLinkTypeMainWebApp extends TdApi.InternalLinkType
The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, then if the user accepts the terms and confirms adding, use toggleBotIsAddedToAttachmentMenu to add the bot. Then, use getMainWebApp with the given start parameter and mode and open the returned URL as a Web App.

- ## Nested Class Summary

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

  `TdApi.InternalLinkType.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `String`
  `botUsername`
  Username of the bot.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.WebAppOpenMode`
  `mode`
  The mode to be passed to getMainWebApp.
  `String`
  `startParameter`
  Start parameter to be passed to getMainWebApp.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InternalLinkTypeMainWebApp()`
  The link is a link to the main Web App of a bot.
  `InternalLinkTypeMainWebApp(String botUsername, String startParameter, TdApi.WebAppOpenMode mode)`
  The link is a link to the main Web App of a bot.

- ## 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.Object

  `toString`

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

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

- ## Field Details

  - ### botUsername

    public String botUsername
    Username of the bot.

  - ### startParameter

    public String startParameter
    Start parameter to be passed to getMainWebApp.

  - ### mode

    public TdApi.WebAppOpenMode mode
    The mode to be passed to getMainWebApp.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### InternalLinkTypeMainWebApp

    public InternalLinkTypeMainWebApp()
    The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, then if the user accepts the terms and confirms adding, use toggleBotIsAddedToAttachmentMenu to add the bot. Then, use getMainWebApp with the given start parameter and mode and open the returned URL as a Web App.

  - ### InternalLinkTypeMainWebApp

    public InternalLinkTypeMainWebApp(String botUsername, String startParameter, TdApi.WebAppOpenMode mode)
    The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, then if the user accepts the terms and confirms adding, use toggleBotIsAddedToAttachmentMenu to add the bot. Then, use getMainWebApp with the given start parameter and mode and open the returned URL as a Web App.
    Parameters:
      `botUsername` - Username of the bot.
      `startParameter` - Start parameter to be passed to getMainWebApp.
      `mode` - The mode to be passed to getMainWebApp.

- ## 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.InternalLinkType`
    Returns:
      this.CONSTRUCTOR