Module tdlight.api

Class TdApi.InternalLinkTypeAttachmentMenuBot

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.InternalLinkType
it.tdlight.jni.TdApi.InternalLinkTypeAttachmentMenuBot
Enclosing class:
TdApi

public static final class TdApi.InternalLinkTypeAttachmentMenuBot extends TdApi.InternalLinkType
The link is a link to an attachment menu bot to be opened in the specified chat. Process given chatLink to open corresponding chat. Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it. If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL.
  • Field Details

    • botUsername

      public String botUsername
      Username of the bot.
    • url

      public String url
      URL to be passed to openWebApp.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • InternalLinkTypeAttachmentMenuBot

      public InternalLinkTypeAttachmentMenuBot()
      The link is a link to an attachment menu bot to be opened in the specified chat. Process given chatLink to open corresponding chat. Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it. If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL.
    • InternalLinkTypeAttachmentMenuBot

      public InternalLinkTypeAttachmentMenuBot(TdApi.InternalLinkType chatLink, String botUsername, String url)
      The link is a link to an attachment menu bot to be opened in the specified chat. Process given chatLink to open corresponding chat. Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it. If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL.
      Parameters:
      chatLink - InternalLinkType An internal link pointing to a chat; may be null if the current chat needs to be kept.
      botUsername - String Username of the bot.
      url - String URL to be passed to openWebApp.
    • InternalLinkTypeAttachmentMenuBot

      public InternalLinkTypeAttachmentMenuBot(DataInput input) throws IOException
      The link is a link to an attachment menu bot to be opened in the specified chat. Process given chatLink to open corresponding chat. Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it. If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL.
      Throws:
      IOException
  • Method Details