mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-02-27 07:02:15 +01:00
Update content of files
This commit is contained in:
parent
48133ad234
commit
5091064750
3 changed files with 44 additions and 7 deletions
|
@ -135,7 +135,23 @@ Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_
|
|||
<li><code>request_chat_title</code> - Contains the group/channel's title.</li>
|
||||
<li><code>request_chat_date</code> - Contains the timestamp indicating when the join request was sent.</li>
|
||||
<li><code>request_chat_broadcast</code> - This flag is set if the join request is related to a channel (otherwise, the join request is related to a group).</li>
|
||||
</ul></div>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#manage-a-connected-business-bot" id="manage-a-connected-business-bot" name="manage-a-connected-business-bot"><i class="anchor-icon"></i></a>Manage a connected business bot</h3>
|
||||
<p>This bar indicates that the associated private (non-secret) chat <em>with another user</em> is currently being managed by a <a href="/api/business#connected-bots">business bot connected to our current account »</a>. </p>
|
||||
<p><strong>Condition</strong>: the <code>business_bot_id</code> and <code>business_bot_manage_url</code> fields of <a href="/constructor/peerSettings">peerSettings</a> must both be set; optionally, <code>business_bot_paused</code> and/or <code>business_bot_can_reply</code> may also be set:</p>
|
||||
<ul>
|
||||
<li><code>business_bot_id</code> - Contains the ID of the <a href="/api/business#connected-bots">business bot »</a> managing this chat, used to display info about the bot in the action bar. </li>
|
||||
<li><code>business_bot_manage_url</code> - Contains a <a href="/api/links">deep link »</a>, used to open a management menu in the business bot. </li>
|
||||
<li><code>business_bot_paused</code> - Whether the business bot was paused in this chat using <a href="/method/account.toggleConnectedBotPaused">account.toggleConnectedBotPaused »</a>. </li>
|
||||
<li><code>business_bot_can_reply</code> - Whether the business bot can reply to messages in this chat, as specified by the settings during <a href="/api/business#connected-bots">initial configuration</a>. </li>
|
||||
</ul>
|
||||
<p>The main action button of the action bar should be a Pause/Resume button that invokes <a href="/method/account.toggleConnectedBotPaused">account.toggleConnectedBotPaused »</a>. </p>
|
||||
<p>The action bar dropdown menu should contain:</p>
|
||||
<ul>
|
||||
<li>A button to manage the bot, by opening the deep link in <code>business_bot_manage_url</code></li>
|
||||
<li>A button to disconnect the bot from this chat, which when pressed should invoke <a href="/method/account.toggleConnectedBotPaused">account.disablePeerConnectedBot »</a> to permanently disconnect the bot from this peer (this will also hide the action bar, unsetting the <code>business_bot_manage_url</code> and <code>business_bot_id</code> fields). </li>
|
||||
</ul>
|
||||
<p>See <a href="/api/business#connected-bots">here »</a> for more info on business bots.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ After reaching at least the boost level specified in the <a href="/api/config#ch
|
|||
<a href='/method/channels.setEmojiStickers'>channels.setEmojiStickers</a>#3cd930b7 channel:<a href='/type/InputChannel'>InputChannel</a> stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>After reaching at least the boost level specified in the <a href="/api/config#group-emoji-stickers-level-min"><code>group_emoji_stickers_level_min</code> »</a> config parameter, supergroups gain the ability to associate a <a href="/api/custom-emoji">custom emoji stickerset »</a>, which can be used by all users of the group (including non-<a href="/api/premium">Premium</a> users!), for messages sent within the group. </p>
|
||||
<p>This feature is the custom emoji stickerset counterpart of the supergroup stickerset feature, available through <a href="/method/channels.setStickers">channels.setStickers</a>. </p>
|
||||
<p>Invoke <a href="/method/channels.setEmojiStickers">channels.setEmojiStickers</a> to choose the custom emoji stickerset to associate to the supergroup, which will be available to users in <a href="/constructor/channelFull">channelFull</a>.<code>emojiset</code>, and should be prioritized when choosing a custom emoji; a <a href="/method/channelAdminLogEventActionChangeEmojiStickerSet">channelAdminLogEventActionChangeEmojiStickerSet</a> will be emitted to the <a href="/api/recent-actions">admin log</a> after invoking that method.</p></div>
|
||||
<p>Invoke <a href="/method/channels.setEmojiStickers">channels.setEmojiStickers</a> to choose the custom emoji stickerset to associate to the supergroup, which will be available to users in <a href="/constructor/channelFull">channelFull</a>.<code>emojiset</code>, and should be prioritized when choosing a custom emoji; a <a href="/constructor/channelAdminLogEventActionChangeEmojiStickerSet">channelAdminLogEventActionChangeEmojiStickerSet</a> will be emitted to the <a href="/api/recent-actions">admin log</a> after invoking that method.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Users can turn their Telegram account into a <strong>business account</strong>, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
|
||||
<p>For the moment, all Telegram Business features are available for free to <a href="/api/premium">Premium</a> subscribers. </p>
|
||||
<h3><a class="anchor" href="#opening-hours" id="opening-hours" name="opening-hours"><i class="anchor-icon"></i></a>Opening hours</h3>
|
||||
<pre><code><a href='/constructor/timezone'>timezone</a>#ff9289f5 id:<a href='/type/string'>string</a> name:<a href='/type/string'>string</a> utc_offset:<a href='/type/int'>int</a> = <a href='/type/Timezone'>Timezone</a>;
|
||||
|
||||
|
@ -293,12 +294,12 @@ This will also emit an <a href="/constructor/updateDeleteQuickReply">updateDelet
|
|||
<h3><a class="anchor" href="#connected-bots" id="connected-bots" name="connected-bots"><i class="anchor-icon"></i></a>Connected bots</h3>
|
||||
<pre><code><a href='/constructor/inputBusinessBotRecipients'>inputBusinessBotRecipients</a>#c4e5921e flags:<a href='/type/%23'>#</a> existing_chats:flags.0?<a href='/constructor/true'>true</a> new_chats:flags.1?<a href='/constructor/true'>true</a> contacts:flags.2?<a href='/constructor/true'>true</a> non_contacts:flags.3?<a href='/constructor/true'>true</a> exclude_selected:flags.5?<a href='/constructor/true'>true</a> users:flags.4?<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> exclude_users:flags.6?<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> = <a href='/type/InputBusinessBotRecipients'>InputBusinessBotRecipients</a>;
|
||||
|
||||
<a href='/constructor/businessBotRecipients'>businessBotRecipients</a>#b88cf373 flags:<a href='/type/%23'>#</a> existing_chats:flags.0?<a href='/constructor/true'>true</a> new_chats:flags.1?<a href='/constructor/true'>true</a> contacts:flags.2?<a href='/constructor/true'>true</a> non_contacts:flags.3?<a href='/constructor/true'>true</a> exclude_selected:flags.5?<a href='/constructor/true'>true</a> users:flags.4?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> exclude_users:flags.6?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/BusinessBotRecipients'>BusinessBotRecipients</a>;
|
||||
|
||||
<a href='/constructor/connectedBot'>connectedBot</a>#bd068601 flags:<a href='/type/%23'>#</a> can_reply:flags.0?<a href='/constructor/true'>true</a> bot_id:<a href='/type/long'>long</a> recipients:<a href='/type/BusinessBotRecipients'>BusinessBotRecipients</a> = <a href='/type/ConnectedBot'>ConnectedBot</a>;
|
||||
|
||||
<a href='/constructor/account.connectedBots'>account.connectedBots</a>#17d7f87b connected_bots:<a href='/type/Vector%20t'>Vector</a><<a href='/type/ConnectedBot'>ConnectedBot</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/account.ConnectedBots'>account.ConnectedBots</a>;
|
||||
|
||||
<a href='/constructor/businessBotRecipients'>businessBotRecipients</a>#b88cf373 flags:<a href='/type/%23'>#</a> existing_chats:flags.0?<a href='/constructor/true'>true</a> new_chats:flags.1?<a href='/constructor/true'>true</a> contacts:flags.2?<a href='/constructor/true'>true</a> non_contacts:flags.3?<a href='/constructor/true'>true</a> exclude_selected:flags.5?<a href='/constructor/true'>true</a> users:flags.4?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> exclude_users:flags.6?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/BusinessBotRecipients'>BusinessBotRecipients</a>;
|
||||
|
||||
<a href='/constructor/botBusinessConnection'>botBusinessConnection</a>#896433b4 flags:<a href='/type/%23'>#</a> can_reply:flags.0?<a href='/constructor/true'>true</a> disabled:flags.1?<a href='/constructor/true'>true</a> connection_id:<a href='/type/string'>string</a> user_id:<a href='/type/long'>long</a> dc_id:<a href='/type/int'>int</a> date:<a href='/type/int'>int</a> = <a href='/type/BotBusinessConnection'>BotBusinessConnection</a>;
|
||||
|
||||
<a href='/constructor/updateBotBusinessConnect'>updateBotBusinessConnect</a>#8ae5c97a connection:<a href='/type/BotBusinessConnection'>BotBusinessConnection</a> qts:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
|
||||
|
@ -308,13 +309,33 @@ This will also emit an <a href="/constructor/updateDeleteQuickReply">updateDelet
|
|||
|
||||
---functions---
|
||||
|
||||
invokeWithBusinessConnection#dd289f8e {X:Type} connection_id:string query:!X = X;
|
||||
|
||||
<a href='/method/account.updateConnectedBot'>account.updateConnectedBot</a>#43d8521d flags:<a href='/type/%23'>#</a> can_reply:flags.0?<a href='/constructor/true'>true</a> deleted:flags.1?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> recipients:<a href='/type/InputBusinessBotRecipients'>InputBusinessBotRecipients</a> = <a href='/type/Updates'>Updates</a>;
|
||||
<a href='/method/account.getConnectedBots'>account.getConnectedBots</a>#4ea4c80f = <a href='/type/account.ConnectedBots'>account.ConnectedBots</a>;
|
||||
|
||||
<a href='/method/account.toggleConnectedBotPaused'>account.toggleConnectedBotPaused</a>#646e1097 peer:<a href='/type/InputPeer'>InputPeer</a> paused:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;
|
||||
<a href='/method/account.disablePeerConnectedBot'>account.disablePeerConnectedBot</a>#5e437ed9 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Bool'>Bool</a>;</code></pre></div>
|
||||
<a href='/method/account.disablePeerConnectedBot'>account.disablePeerConnectedBot</a>#5e437ed9 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
invokeWithBusinessConnection#dd289f8e {X:Type} connection_id:string query:!X = X;</code></pre>
|
||||
<p>Business users can connect Telegram bots that will process and answer messages <strong>on their behalf</strong>. This allows businesses to <strong>seamlessly integrate</strong> any existing tools and workflows, or add <strong>AI assistants</strong> that manage their chats. </p>
|
||||
<p>Currently just one business bot may be connected to a user account.<br>
|
||||
Bots which may be connected to user accounts have the <a href="/constructor/user">user</a>.<code>bot_business</code> flag set; trying to connect a non-business bot will emit a <code>BOT_BUSINESS_MISSING</code> error. </p>
|
||||
<p>Use <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a> to connect a business bot to the current account, or to change the connection settings.<br>
|
||||
Use <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a> with the <code>deleted</code> flag set to disconnect a business bot from the current account.<br>
|
||||
Use <a href="/method/account.getConnectedBots">account.getConnectedBots »</a> list all currently connect business bots. </p>
|
||||
<p>Use <a href="/method/account.toggleConnectedBotPaused">account.toggleConnectedBotPaused »</a> to pause or unpause a specific chat, temporarily disconnecting it from all business bots (equivalent to temporarily specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>).<br>
|
||||
Use <a href="/method/account.toggleConnectedBotPaused">account.disablePeerConnectedBot »</a> to permanently disconnect a specific chat from all business bots (equivalent to specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>. </p>
|
||||
<p>The above two methods should be invoked when pressing the appropriate buttons in the <a href="/api/action-bar#manage-a-connected-business-bot">action bar, see here »</a> for more info on the business bot action bar that should be displayed on all peers currently managed by the bot, according to the <a href="/api/action-bar#manage-a-connected-business-bot">action bar flags »</a>. </p>
|
||||
<p>Connecting or disconnecting a business bot or changing the connection settings will emit an <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> update to the bot, with the new settings and a <code>connection_id</code> that will be used by the bot to handle updates from and send messages as the user. </p>
|
||||
<p>According to the specified settings, the bot will start receiving <a href="/constructor/updateBotNewBusinessMessage">updateBotNewBusinessMessage</a>, <a href="/constructor/updateBotEditBusinessMessage">updateBotEditBusinessMessage</a>, <a href="/constructor/updateBotDeleteBusinessMessage">updateBotDeleteBusinessMessage</a> updates containing messages sent to the connected user via the business connection. </p>
|
||||
<p>If the <code>can_reply</code> flag was set when connecting the bot, the bot will also be able to invoke the following methods on behalf of the user to interact with messages received via the business connection, by wrapping the query in a <a href="/constructor/invokeWithBusinessConnection">invokeWithBusinessConnection »</a>, passing the connection ID: </p>
|
||||
<ul>
|
||||
<li><a href="/method/messages.sendMessage">messages.sendMessage</a></li>
|
||||
<li><a href="/method/messages.editMessage">messages.editMessage</a></li>
|
||||
<li><a href="/method/messages.sendMedia">messages.sendMedia</a></li>
|
||||
<li><a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a></li>
|
||||
<li><a href="/method/messages.setTyping">messages.setTyping</a></li>
|
||||
</ul>
|
||||
<p><a href="/constructor/message">Message</a>s sent by business bots on behalf of the user using this method will have the <code>via_business_connection</code> flag set, indicating that the message was sent by the business bot indicated in <a href="/constructor/message">message</a>.<code>via_bot_id</code>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue