TDLib
Loading...
Searching...
No Matches
internalLinkTypeBotAddToChannel Class Referencefinal

Inherits InternalLinkType.

Description

The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, 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 and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights.

Public Member Functions

 internalLinkTypeBotAddToChannel ()
 internalLinkTypeBotAddToChannel (string const &bot_username_, object_ptr< chatAdministratorRights > &&administrator_rights_)
void store (TlStorerToString &s, const char *field_name) const final
Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
TlObject & operator= (TlObject &&)=default
virtual void store (TlStorerCalcLength &s) const
virtual void store (TlStorerUnsafe &s) const
 TlObject ()=default
 TlObject (const TlObject &)=delete
 TlObject (TlObject &&)=default
virtual ~TlObject ()=default

Public Attributes

object_ptr< chatAdministratorRights > administrator_rights_
 Expected administrator rights for the bot.
string bot_username_
 Username of the bot.

Static Public Attributes

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

Constructor & Destructor Documentation

◆ internalLinkTypeBotAddToChannel() [1/2]

internalLinkTypeBotAddToChannel ( )

The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, 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 and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights.

◆ internalLinkTypeBotAddToChannel() [2/2]

internalLinkTypeBotAddToChannel ( string const & bot_username_,
object_ptr< chatAdministratorRights > && administrator_rights_ )

The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, 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 and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights.

Parameters
[in]bot_username_Username of the bot.
[in]administrator_rights_Expected administrator rights for the bot.

Member Function Documentation

◆ store()

void 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 TlObject.


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