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

Inherits td::td_api::InternalLinkType.

Public Member Functions

 internalLinkTypeBotStartInGroup ()
 
 internalLinkTypeBotStartInGroup (string const &bot_username_, string const &start_parameter_, object_ptr< chatAdministratorRights > &&administrator_rights_)
 
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

string bot_username_
 Username of the bot.
 
string start_parameter_
 The parameter to be passed to sendBotStartMessage.
 
object_ptr< chatAdministratorRightsadministrator_rights_
 Expected administrator rights for the bot; may be null.
 

Static Public Attributes

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

Detailed Description

The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat.

Constructor & Destructor Documentation

◆ internalLinkTypeBotStartInGroup() [1/2]

td::td_api::internalLinkTypeBotStartInGroup::internalLinkTypeBotStartInGroup ( )

The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat.

◆ internalLinkTypeBotStartInGroup() [2/2]

td::td_api::internalLinkTypeBotStartInGroup::internalLinkTypeBotStartInGroup ( string const &  bot_username_,
string const &  start_parameter_,
object_ptr< chatAdministratorRights > &&  administrator_rights_ 
)

The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat.

Parameters
[in]bot_username_Username of the bot.
[in]start_parameter_The parameter to be passed to sendBotStartMessage.
[in]administrator_rights_Expected administrator rights for the bot; may be null.

Member Function Documentation

◆ get_id()

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

Returns identifier uniquely determining a type of the object.

Returns
this->ID.

Implements td::TlObject.

◆ store()

void td::td_api::internalLinkTypeBotStartInGroup::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: