Module tdlight.api
Package it.tdlight.jni

# 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 or a chosen chat. Process given targetChat to open the 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 show a disclaimer about Mini Apps being a third-party apps, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL.

## 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.TargetChat`
`targetChat`
Target chat to be opened.
`String`
`url`
URL to be passed to openWebApp.

## Constructor Summary

Constructors
Constructor
Description
`InternalLinkTypeAttachmentMenuBot()`
The link is a link to an attachment menu bot to be opened in the specified or a chosen chat.
`InternalLinkTypeAttachmentMenuBot(TdApi.TargetChat targetChat, String botUsername, String url)`
The link is a link to an attachment menu bot to be opened in the specified or a chosen chat.
`InternalLinkTypeAttachmentMenuBot(DataInput input)`
The link is a link to an attachment menu bot to be opened in the specified or a chosen chat.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
Returns an identifier uniquely determining type of the object.
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`
Serialize the TDLib class

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

`serialize, toString`

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

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

## Field Details

### targetChat

public TdApi.TargetChat targetChat
Target chat to be opened.

### botUsername

public String botUsername
Username of the bot.

### url

public String url
URL to be passed to openWebApp.

### CONSTRUCTOR

public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.

See Also:
  - Constant Field Values

## Constructor Details

### InternalLinkTypeAttachmentMenuBot

public InternalLinkTypeAttachmentMenuBot()
The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given targetChat to open the 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 show a disclaimer about Mini Apps being a third-party apps, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL.

### InternalLinkTypeAttachmentMenuBot

public InternalLinkTypeAttachmentMenuBot(TdApi.TargetChat targetChat, String botUsername, String url)
The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given targetChat to open the 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 show a disclaimer about Mini Apps being a third-party apps, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL.

Parameters:
  `targetChat` - Target chat to be opened.
  `botUsername` - Username of the bot.
  `url` - 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 or a chosen chat. Process given targetChat to open the 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 show a disclaimer about Mini Apps being a third-party apps, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL.

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`