TDLib
Loading...
Searching...
No Matches
td::td_api::internalLinkTypeAttachmentMenuBot Class Referencefinal

Inherits td::td_api::InternalLinkType.

Public Member Functions

 internalLinkTypeAttachmentMenuBot ()
 
 internalLinkTypeAttachmentMenuBot (object_ptr< TargetChat > &&target_chat_, string const &bot_username_, string const &url_)
 
std::int32_t get_id () const final
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Member Functions inherited from td::TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Public Attributes

object_ptr< TargetChattarget_chat_
 Target chat to be opened.
 
string bot_username_
 Username of the bot.
 
string url_
 URL to be passed to openWebApp.
 

Static Public Attributes

static const std::int32_t ID = 1682719269
 Identifier uniquely determining a type of the object.
 

Detailed Description

The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat 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.

Constructor & Destructor Documentation

◆ internalLinkTypeAttachmentMenuBot() [1/2]

td::td_api::internalLinkTypeAttachmentMenuBot::internalLinkTypeAttachmentMenuBot ( )

The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat 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() [2/2]

td::td_api::internalLinkTypeAttachmentMenuBot::internalLinkTypeAttachmentMenuBot ( object_ptr< TargetChat > &&  target_chat_,
string const &  bot_username_,
string const &  url_ 
)

The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat 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
[in]target_chat_Target chat to be opened.
[in]bot_username_Username of the bot.
[in]url_URL to be passed to openWebApp.

Member Function Documentation

◆ get_id()

std::int32_t td::td_api::internalLinkTypeAttachmentMenuBot::get_id ( ) const
inlinefinalvirtual

Returns identifier uniquely determining a type of the object.

Returns
this->ID.

Implements td::TlObject.

◆ store()

void td::td_api::internalLinkTypeAttachmentMenuBot::store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements td::TlObject.


The documentation for this class was generated from the following file: