mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-03-19 14:58:54 +01:00
Update content of files
This commit is contained in:
parent
7c95f369c3
commit
551fcd0ffb
13 changed files with 1727 additions and 190 deletions
|
@ -51,6 +51,26 @@ To learn how to create…">
|
|||
<blockquote>
|
||||
<p>Subscribe to <a href="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <a href="https://t.me/bottalk">@BotTalk</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="april-16-2022" href="#april-16-2022"><i class="anchor-icon"></i></a>April 16, 2022</h3>
|
||||
<p><strong>Bot API 6.0</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <strong>Web Apps</strong>, see the <a href="/bots/webapps">detailed manual here</a>. (<a href="https://telegram.org/blog/notifications-bots">blog announcement</a>)</li>
|
||||
<li>Added the class <a href="/bots/api#webappinfo">WebAppInfo</a> and the fields <em>web_app</em> to the classes <a href="/bots/api#keyboardbutton">KeyboardButton</a> and <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added the class <a href="/bots/api#sentwebappmessage">SentWebAppMessage</a> and the method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> for sending an answer to a Web App query, which originated from an inline button of the 'web_app' type.</li>
|
||||
<li>Added the class <a href="/bots/api#webappdata">WebAppData</a> and the field <em>web_app_data</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the class <a href="/bots/api#menubutton">MenuButton</a> and the methods <a href="/bots/api#setchatmenubutton">setChatMenuButton</a> and <a href="/bots/api#getchatmenubutton">getChatMenuButton</a> for managing the behavior of the bot's menu button in private chats.</li>
|
||||
<li>Added the class <a href="/bots/api#chatadministratorrights">ChatAdministratorRights</a> and the methods <a href="/bots/api#setmydefaultadministratorrights">setMyDefaultAdministratorRights</a> and <a href="/bots/api#getmydefaultadministratorrights">getMyDefaultAdministratorRights</a> for managing the bot's default administrator rights.</li>
|
||||
<li>Added support for t.me links that can be used to add the bot to groups and channels as an administrator.</li>
|
||||
<li>Added the field <em>last_synchronization_error_date</em> to the class <a href="/bots/api#webhookinfo">WebhookInfo</a>.</li>
|
||||
<li>Renamed the field <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the class <a href="/bots/api#chatmemberadministrator">ChatMemberAdministrator</a>. The old field will remain temporarily available.</li>
|
||||
<li>Renamed the parameter <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the method <a href="/bots/api#promotechatmember">promoteChatMember</a>. The old parameter will remain temporarily available.</li>
|
||||
<li>Renamed the fields <em>voice_chat_scheduled</em>, <em>voice_chat_started</em>, <em>voice_chat_ended</em>, and <em>voice_chat_participants_invited</em> to <em>video_chat_scheduled</em>, <em>video_chat_started</em>, <em>video_chat_ended</em>, and <em>video_chat_participants_invited</em> in the class <a href="/bots/api#message">Message</a>. The old fields will remain temporarily available.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After the next update, only HTTPS links will be allowed in <em>login_url</em> inline keyboard buttons.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="january-31-2022" href="#january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h3>
|
||||
<p><strong>Bot API 5.7</strong></p>
|
||||
<ul>
|
||||
|
|
|
@ -50,6 +50,26 @@ To learn how to create…">
|
|||
<blockquote>
|
||||
<p>Subscribe to <a href="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <a href="https://t.me/bottalk">@BotTalk</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="april-16-2022" href="#april-16-2022"><i class="anchor-icon"></i></a>April 16, 2022</h4>
|
||||
<p><strong>Bot API 6.0</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <strong>Web Apps</strong>, see the <a href="/bots/webapps">detailed manual here</a>. (<a href="https://telegram.org/blog/notifications-bots">blog announcement</a>)</li>
|
||||
<li>Added the class <a href="#webappinfo">WebAppInfo</a> and the fields <em>web_app</em> to the classes <a href="#keyboardbutton">KeyboardButton</a> and <a href="#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added the class <a href="#sentwebappmessage">SentWebAppMessage</a> and the method <a href="#answerwebappquery">answerWebAppQuery</a> for sending an answer to a Web App query, which originated from an inline button of the 'web_app' type.</li>
|
||||
<li>Added the class <a href="#webappdata">WebAppData</a> and the field <em>web_app_data</em> to the class <a href="#message">Message</a>.</li>
|
||||
<li>Added the class <a href="#menubutton">MenuButton</a> and the methods <a href="#setchatmenubutton">setChatMenuButton</a> and <a href="#getchatmenubutton">getChatMenuButton</a> for managing the behavior of the bot's menu button in private chats.</li>
|
||||
<li>Added the class <a href="#chatadministratorrights">ChatAdministratorRights</a> and the methods <a href="#setmydefaultadministratorrights">setMyDefaultAdministratorRights</a> and <a href="#getmydefaultadministratorrights">getMyDefaultAdministratorRights</a> for managing the bot's default administrator rights.</li>
|
||||
<li>Added support for t.me links that can be used to add the bot to groups and channels as an administrator.</li>
|
||||
<li>Added the field <em>last_synchronization_error_date</em> to the class <a href="#webhookinfo">WebhookInfo</a>.</li>
|
||||
<li>Renamed the field <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the class <a href="#chatmemberadministrator">ChatMemberAdministrator</a>. The old field will remain temporarily available.</li>
|
||||
<li>Renamed the parameter <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the method <a href="#promotechatmember">promoteChatMember</a>. The old parameter will remain temporarily available.</li>
|
||||
<li>Renamed the fields <em>voice_chat_scheduled</em>, <em>voice_chat_started</em>, <em>voice_chat_ended</em>, and <em>voice_chat_participants_invited</em> to <em>video_chat_scheduled</em>, <em>video_chat_started</em>, <em>video_chat_ended</em>, and <em>video_chat_participants_invited</em> in the class <a href="#message">Message</a>. The old fields will remain temporarily available.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After the next update, only HTTPS links will be allowed in <em>login_url</em> inline keyboard buttons.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h4><a class="anchor" name="january-31-2022" href="#january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h4>
|
||||
<p><strong>Bot API 5.7</strong></p>
|
||||
<ul>
|
||||
|
@ -79,16 +99,6 @@ To learn how to create…">
|
|||
<p><strong>Note:</strong> After this update it will become impossible to forward messages from some chats. Use the fields <em>has_protected_content</em> in the classes <a href="#message">Message</a> and <a href="#chat">Chat</a> to check this.</p>
|
||||
<p><strong>Note:</strong> After this update users are able to send messages on behalf of channels they own. Bots are expected to use the field <em>sender_chat</em> in the class <a href="#message">Message</a> to correctly support such messages.</p>
|
||||
<p><strong>Note:</strong> As previously announced, user identifiers can now have up to 52 significant bits and require a 64-bit integer or double-precision float type to be stored safely.</p>
|
||||
<h4><a class="anchor" name="november-5-2021" href="#november-5-2021"><i class="anchor-icon"></i></a>November 5, 2021</h4>
|
||||
<p><strong>Bot API 5.4</strong></p>
|
||||
<ul>
|
||||
<li>Added the the parameter <code>creates_join_request</code> to the methods <a href="#createchatinvitelink">createChatInviteLink</a> and <a href="#editchatinvitelink">editChatInviteLink</a> for managing chat invite links that create join requests (read more about this on our <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#join-requests-for-groups-and-channels">blog</a>).</li>
|
||||
<li>Added the fields <code>creates_join_request</code> and <code>pending_join_request_count</code> to the class <a href="#chatinvitelink">ChatInviteLink</a>.</li>
|
||||
<li>Added the field <code>name</code> to the class <a href="#chatinvitelink">ChatInviteLink</a> and the parameters <code>name</code> to the methods <a href="#createchatinvitelink">createChatInviteLink</a> and <a href="#editchatinvitelink">editChatInviteLink</a> for managing <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#unique-names-for-invite-links">invite link names</a>.</li>
|
||||
<li>Added updates about new requests to join the chat, represented by the class <a href="#chatjoinrequest">ChatJoinRequest</a> and the field <em>chat_join_request</em> in the <a href="#update">Update</a> class. The bot must be an administrator in the chat with the <em>can_invite_users</em> administrator right to receive these updates.</li>
|
||||
<li>Added the methods <a href="#approvechatjoinrequest">approveChatJoinRequest</a> and <a href="#declinechatjoinrequest">declineChatJoinRequest</a> for managing requests to join the chat.</li>
|
||||
<li>Added support for the <em>choose_sticker</em> action in the method <a href="#sendchataction">sendChatAction</a>.</li>
|
||||
</ul>
|
||||
<p><strong><a href="/bots/api-changelog">See earlier changes »</a></strong></p>
|
||||
<h3><a class="anchor" name="authorizing-your-bot" href="#authorizing-your-bot"><i class="anchor-icon"></i></a>Authorizing your bot</h3>
|
||||
<p>Each bot is given a unique authentication token <a href="/bots#6-botfather">when it is created</a>. The token looks something like <code>123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11</code>, but we'll use simply <strong><token></strong> in this document instead. You can learn about obtaining tokens and generating new ones in <a href="https://core.telegram.org/bots#6-botfather">this document</a>.</p>
|
||||
|
@ -377,6 +387,11 @@ To learn how to create…">
|
|||
<td><em>Optional</em>. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>last_synchronization_error_date</td>
|
||||
<td>Integer</td>
|
||||
<td><em>Optional</em>. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>max_connections</td>
|
||||
<td>Integer</td>
|
||||
<td><em>Optional</em>. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery</td>
|
||||
|
@ -842,24 +857,29 @@ To learn how to create…">
|
|||
<td><em>Optional</em>. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_scheduled</td>
|
||||
<td><a href="#voicechatscheduled">VoiceChatScheduled</a></td>
|
||||
<td><em>Optional</em>. Service message: voice chat scheduled</td>
|
||||
<td>video_chat_scheduled</td>
|
||||
<td><a href="#videochatscheduled">VideoChatScheduled</a></td>
|
||||
<td><em>Optional</em>. Service message: video chat scheduled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_started</td>
|
||||
<td><a href="#voicechatstarted">VoiceChatStarted</a></td>
|
||||
<td><em>Optional</em>. Service message: voice chat started</td>
|
||||
<td>video_chat_started</td>
|
||||
<td><a href="#videochatstarted">VideoChatStarted</a></td>
|
||||
<td><em>Optional</em>. Service message: video chat started</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_ended</td>
|
||||
<td><a href="#voicechatended">VoiceChatEnded</a></td>
|
||||
<td><em>Optional</em>. Service message: voice chat ended</td>
|
||||
<td>video_chat_ended</td>
|
||||
<td><a href="#videochatended">VideoChatEnded</a></td>
|
||||
<td><em>Optional</em>. Service message: video chat ended</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_participants_invited</td>
|
||||
<td><a href="#voicechatparticipantsinvited">VoiceChatParticipantsInvited</a></td>
|
||||
<td><em>Optional</em>. Service message: new participants invited to a voice chat</td>
|
||||
<td>video_chat_participants_invited</td>
|
||||
<td><a href="#videochatparticipantsinvited">VideoChatParticipantsInvited</a></td>
|
||||
<td><em>Optional</em>. Service message: new participants invited to a video chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app_data</td>
|
||||
<td><a href="#webappdata">WebAppData</a></td>
|
||||
<td><em>Optional</em>. Service message: data sent by a Web App</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>reply_markup</td>
|
||||
|
@ -1546,6 +1566,29 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="webappdata" href="#webappdata"><i class="anchor-icon"></i></a>WebAppData</h4>
|
||||
<p>Contains data sent from a <a href="/bots/webapps">Web App</a> to the bot.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>data</td>
|
||||
<td>String</td>
|
||||
<td>The data. Be aware that a bad client can send arbitrary data in this field.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>button_text</td>
|
||||
<td>String</td>
|
||||
<td>Text of the <em>web_app</em> keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="proximityalerttriggered" href="#proximityalerttriggered"><i class="anchor-icon"></i></a>ProximityAlertTriggered</h4>
|
||||
<p>This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.</p>
|
||||
<table class="table">
|
||||
|
@ -1592,8 +1635,8 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="voicechatscheduled" href="#voicechatscheduled"><i class="anchor-icon"></i></a>VoiceChatScheduled</h4>
|
||||
<p>This object represents a service message about a voice chat scheduled in the chat.</p>
|
||||
<h4><a class="anchor" name="videochatscheduled" href="#videochatscheduled"><i class="anchor-icon"></i></a>VideoChatScheduled</h4>
|
||||
<p>This object represents a service message about a video chat scheduled in the chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1606,14 +1649,14 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>start_date</td>
|
||||
<td>Integer</td>
|
||||
<td>Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator</td>
|
||||
<td>Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="voicechatstarted" href="#voicechatstarted"><i class="anchor-icon"></i></a>VoiceChatStarted</h4>
|
||||
<p>This object represents a service message about a voice chat started in the chat. Currently holds no information.</p>
|
||||
<h4><a class="anchor" name="voicechatended" href="#voicechatended"><i class="anchor-icon"></i></a>VoiceChatEnded</h4>
|
||||
<p>This object represents a service message about a voice chat ended in the chat.</p>
|
||||
<h4><a class="anchor" name="videochatstarted" href="#videochatstarted"><i class="anchor-icon"></i></a>VideoChatStarted</h4>
|
||||
<p>This object represents a service message about a video chat started in the chat. Currently holds no information.</p>
|
||||
<h4><a class="anchor" name="videochatended" href="#videochatended"><i class="anchor-icon"></i></a>VideoChatEnded</h4>
|
||||
<p>This object represents a service message about a video chat ended in the chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1626,12 +1669,12 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>duration</td>
|
||||
<td>Integer</td>
|
||||
<td>Voice chat duration in seconds</td>
|
||||
<td>Video chat duration in seconds</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="voicechatparticipantsinvited" href="#voicechatparticipantsinvited"><i class="anchor-icon"></i></a>VoiceChatParticipantsInvited</h4>
|
||||
<p>This object represents a service message about new members invited to a voice chat.</p>
|
||||
<h4><a class="anchor" name="videochatparticipantsinvited" href="#videochatparticipantsinvited"><i class="anchor-icon"></i></a>VideoChatParticipantsInvited</h4>
|
||||
<p>This object represents a service message about new members invited to a video chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1644,7 +1687,7 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>users</td>
|
||||
<td>Array of <a href="#user">User</a></td>
|
||||
<td><em>Optional</em>. New members that were invited to the voice chat</td>
|
||||
<td>New members that were invited to the video chat</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1707,6 +1750,24 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="webappinfo" href="#webappinfo"><i class="anchor-icon"></i></a>WebAppInfo</h4>
|
||||
<p>Contains information about a <a href="/bots/webapps">Web App</a>.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>url</td>
|
||||
<td>String</td>
|
||||
<td>An HTTPS URL of a Web App to be opened with additional data as specified in <a href="/bots/webapps#initializing-web-apps">Initializing Web Apps</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="replykeyboardmarkup" href="#replykeyboardmarkup"><i class="anchor-icon"></i></a>ReplyKeyboardMarkup</h4>
|
||||
<p>This object represents a <a href="https://core.telegram.org/bots#keyboards">custom keyboard</a> with reply options (see <a href="https://core.telegram.org/bots#keyboards">Introduction to bots</a> for details and examples).</p>
|
||||
<table class="table">
|
||||
|
@ -1746,7 +1807,7 @@ To learn how to create…">
|
|||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="keyboardbutton" href="#keyboardbutton"><i class="anchor-icon"></i></a>KeyboardButton</h4>
|
||||
<p>This object represents one button of the reply keyboard. For simple text buttons <em>String</em> can be used instead of this object to specify text of the button. Optional fields <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p>
|
||||
<p>This object represents one button of the reply keyboard. For simple text buttons <em>String</em> can be used instead of this object to specify text of the button. Optional fields <em>web_app</em>, <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1764,21 +1825,26 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>request_contact</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>request_location</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's current location will be sent when the button is pressed. Available in private chats only</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's current location will be sent when the button is pressed. Available in private chats only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>request_poll</td>
|
||||
<td><a href="#keyboardbuttonpolltype">KeyboardButtonPollType</a></td>
|
||||
<td><em>Optional</em>. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only</td>
|
||||
<td><em>Optional</em>. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app</td>
|
||||
<td><a href="#webappinfo">WebAppInfo</a></td>
|
||||
<td><em>Optional</em>. If specified, the described <a href="/bots/webapps">Web App</a> will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.</p>
|
||||
<p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong> <em>web_app</em> option will only work in Telegram versions released after 16 April, 2022. Older clients will display <em>unsupported message</em>.</p>
|
||||
<h4><a class="anchor" name="keyboardbuttonpolltype" href="#keyboardbuttonpolltype"><i class="anchor-icon"></i></a>KeyboardButtonPollType</h4>
|
||||
<p>This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.</p>
|
||||
<table class="table">
|
||||
|
@ -1861,16 +1927,21 @@ To learn how to create…">
|
|||
<td><em>Optional</em>. HTTP or tg:// url to be opened when the button is pressed. Links <code>tg://user?id=<user_id></code> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_url</td>
|
||||
<td><a href="#loginurl">LoginUrl</a></td>
|
||||
<td><em>Optional</em>. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the <a href="https://core.telegram.org/widgets/login">Telegram Login Widget</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>callback_data</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Data to be sent in a <a href="#callbackquery">callback query</a> to the bot when button is pressed, 1-64 bytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app</td>
|
||||
<td><a href="#webappinfo">WebAppInfo</a></td>
|
||||
<td><em>Optional</em>. Description of the <a href="/bots/webapps">Web App</a> that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href="#answerwebappquery">answerWebAppQuery</a>. Available only in private chats between a user and the bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_url</td>
|
||||
<td><a href="#loginurl">LoginUrl</a></td>
|
||||
<td><em>Optional</em>. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the <a href="https://core.telegram.org/widgets/login">Telegram Login Widget</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>switch_inline_query</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted.<br><br><strong>Note:</strong> This offers an easy way for users to start using your bot in <a href="/bots/inline">inline mode</a> when they are currently in a private chat with it. Especially useful when combined with <a href="#answerinlinequery"><em>switch_pm…</em></a> actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.</td>
|
||||
|
@ -2111,6 +2182,74 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="chatadministratorrights" href="#chatadministratorrights"><i class="anchor-icon"></i></a>ChatAdministratorRights</h4>
|
||||
<p>Represents the rights of an administrator in a chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>is_anonymous</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the user's presence in the chat is hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_chat</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_delete_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can delete messages of other users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_video_chats</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can manage video chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_restrict_members</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can restrict, ban or unban chat members</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_promote_members</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_change_info</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the user is allowed to change the chat title, photo and other settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_invite_users</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the user is allowed to invite new users to the chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_post_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_edit_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; channels only</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_pin_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; groups and supergroups only</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="chatmember" href="#chatmember"><i class="anchor-icon"></i></a>ChatMember</h4>
|
||||
<p>This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:</p>
|
||||
<ul>
|
||||
|
@ -2196,9 +2335,9 @@ To learn how to create…">
|
|||
<td><em>True</em>, if the administrator can delete messages of other users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_voice_chats</td>
|
||||
<td>can_manage_video_chats</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can manage voice chats</td>
|
||||
<td><em>True</em>, if the administrator can manage video chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_restrict_members</td>
|
||||
|
@ -2752,6 +2891,78 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="menubutton" href="#menubutton"><i class="anchor-icon"></i></a>MenuButton</h4>
|
||||
<p>This object describes the bot's menu button in a private chat. It should be one of</p>
|
||||
<ul>
|
||||
<li><a href="#menubuttoncommands">MenuButtonCommands</a></li>
|
||||
<li><a href="#menubuttonwebapp">MenuButtonWebApp</a></li>
|
||||
<li><a href="#menubuttondefault">MenuButtonDefault</a></li>
|
||||
</ul>
|
||||
<p>If a menu button other than <a href="#menubuttondefault">MenuButtonDefault</a> is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.</p>
|
||||
<h4><a class="anchor" name="menubuttoncommands" href="#menubuttoncommands"><i class="anchor-icon"></i></a>MenuButtonCommands</h4>
|
||||
<p>Represents a menu button, which opens the bot's list of commands.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td>Type of the button, must be <em>commands</em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="menubuttonwebapp" href="#menubuttonwebapp"><i class="anchor-icon"></i></a>MenuButtonWebApp</h4>
|
||||
<p>Represents a menu button, which launches a <a href="/bots/webapps">Web App</a>.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td>Type of the button, must be <em>web_app</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>text</td>
|
||||
<td>String</td>
|
||||
<td>Text on the button</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app</td>
|
||||
<td><a href="#webappinfo">WebAppInfo</a></td>
|
||||
<td>Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href="#answerwebappquery">answerWebAppQuery</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="menubuttondefault" href="#menubuttondefault"><i class="anchor-icon"></i></a>MenuButtonDefault</h4>
|
||||
<p>Describes that no specific value for the menu button was set.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td>Type of the button, must be <em>default</em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="responseparameters" href="#responseparameters"><i class="anchor-icon"></i></a>ResponseParameters</h4>
|
||||
<p>Contains information about why a request was unsuccessful.</p>
|
||||
<table class="table">
|
||||
|
@ -4812,10 +5023,10 @@ pre-formatted fixed-width code block written in the Python programming language
|
|||
<td>Pass <em>True</em>, if the administrator can delete messages of other users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_voice_chats</td>
|
||||
<td>can_manage_video_chats</td>
|
||||
<td>Boolean</td>
|
||||
<td>Optional</td>
|
||||
<td>Pass <em>True</em>, if the administrator can manage voice chats</td>
|
||||
<td>Pass <em>True</em>, if the administrator can manage video chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_restrict_members</td>
|
||||
|
@ -5613,6 +5824,98 @@ pre-formatted fixed-width code block written in the Python programming language
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="setchatmenubutton" href="#setchatmenubutton"><i class="anchor-icon"></i></a>setChatMenuButton</h4>
|
||||
<p>Use this method to change the bot's menu button in a private chat, or the default menu button. Returns <em>True</em> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>chat_id</td>
|
||||
<td>Integer</td>
|
||||
<td>Optional</td>
|
||||
<td>Unique identifier for the target private chat. If not specified, default bot's menu button will be changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>menu_button</td>
|
||||
<td><a href="#menubutton">MenuButton</a></td>
|
||||
<td>Optional</td>
|
||||
<td>A JSON-serialized object for the new bot's menu button. Defaults to <a href="#menubuttondefault">MenuButtonDefault</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="getchatmenubutton" href="#getchatmenubutton"><i class="anchor-icon"></i></a>getChatMenuButton</h4>
|
||||
<p>Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns <a href="#menubutton">MenuButton</a> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>chat_id</td>
|
||||
<td>Integer</td>
|
||||
<td>Optional</td>
|
||||
<td>Unique identifier for the target private chat. If not specified, default bot's menu button will be returned</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="setmydefaultadministratorrights" href="#setmydefaultadministratorrights"><i class="anchor-icon"></i></a>setMyDefaultAdministratorRights</h4>
|
||||
<p>Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns <em>True</em> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>rights</td>
|
||||
<td><a href="#chatadministratorrights">ChatAdministratorRights</a></td>
|
||||
<td>Optional</td>
|
||||
<td>A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>for_channels</td>
|
||||
<td>Boolean</td>
|
||||
<td>Optional</td>
|
||||
<td>Pass <em>True</em> to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="getmydefaultadministratorrights" href="#getmydefaultadministratorrights"><i class="anchor-icon"></i></a>getMyDefaultAdministratorRights</h4>
|
||||
<p>Use this method to get the current default administrator rights of the bot. Returns <a href="#chatadministratorrights">ChatAdministratorRights</a> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>for_channels</td>
|
||||
<td>Boolean</td>
|
||||
<td>Optional</td>
|
||||
<td>Pass <em>True</em> to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="inline-mode-methods" href="#inline-mode-methods"><i class="anchor-icon"></i></a>Inline mode methods</h4>
|
||||
<p>Methods and objects used in the inline mode are described in the <a href="#inline-mode">Inline mode section</a>.</p>
|
||||
<h3><a class="anchor" name="updating-messages" href="#updating-messages"><i class="anchor-icon"></i></a>Updating messages</h3>
|
||||
|
@ -8135,6 +8438,50 @@ pre-formatted fixed-width code block written in the Python programming language
|
|||
</tbody>
|
||||
</table>
|
||||
<p><strong>Note:</strong> It is necessary to enable <a href="/bots/inline#collecting-feedback">inline feedback</a> via <a href="https://t.me/botfather">@Botfather</a> in order to receive these objects in updates.</p>
|
||||
<h4><a class="anchor" name="answerwebappquery" href="#answerwebappquery"><i class="anchor-icon"></i></a>answerWebAppQuery</h4>
|
||||
<p>Use this method to set the result of an interaction with a <a href="/bots/webapps">Web App</a> and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a <a href="#sentwebappmessage">SentWebAppMessage</a> object is returned.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>web_app_query_id</td>
|
||||
<td>String</td>
|
||||
<td>Yes</td>
|
||||
<td>Unique identifier for the query to be answered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>result</td>
|
||||
<td><a href="#inlinequeryresult">InlineQueryResult</a></td>
|
||||
<td>Yes</td>
|
||||
<td>A JSON-serialized object describing the message to be sent</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="sentwebappmessage" href="#sentwebappmessage"><i class="anchor-icon"></i></a>SentWebAppMessage</h4>
|
||||
<p>Contains information about an inline message sent by a <a href="/bots/webapps">Web App</a> on behalf of a user.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>inline_message_id</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Identifier of the sent inline message. Available only if there is an <a href="#inlinekeyboardmarkup">inline keyboard</a> attached to the message.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" name="payments" href="#payments"><i class="anchor-icon"></i></a>Payments</h3>
|
||||
<p>Your bot can accept payments from Telegram users. Please see the <a href="/bots/payments">introduction to payments</a> for more details on the process and how to set up payments for your bot. Please note that users will need Telegram v.4.0 or higher to use payments (released on May 18, 2017).</p>
|
||||
<h4><a class="anchor" name="sendinvoice" href="#sendinvoice"><i class="anchor-icon"></i></a>sendInvoice</h4>
|
||||
|
|
|
@ -51,6 +51,26 @@ To learn how to create…">
|
|||
<blockquote>
|
||||
<p>Subscribe to <a href="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <a href="https://t.me/bottalk">@BotTalk</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="april-16-2022" href="#april-16-2022"><i class="anchor-icon"></i></a>April 16, 2022</h3>
|
||||
<p><strong>Bot API 6.0</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <strong>Web Apps</strong>, see the <a href="/bots/webapps">detailed manual here</a>. (<a href="https://telegram.org/blog/notifications-bots">blog announcement</a>)</li>
|
||||
<li>Added the class <a href="/bots/api#webappinfo">WebAppInfo</a> and the fields <em>web_app</em> to the classes <a href="/bots/api#keyboardbutton">KeyboardButton</a> and <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added the class <a href="/bots/api#sentwebappmessage">SentWebAppMessage</a> and the method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> for sending an answer to a Web App query, which originated from an inline button of the 'web_app' type.</li>
|
||||
<li>Added the class <a href="/bots/api#webappdata">WebAppData</a> and the field <em>web_app_data</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the class <a href="/bots/api#menubutton">MenuButton</a> and the methods <a href="/bots/api#setchatmenubutton">setChatMenuButton</a> and <a href="/bots/api#getchatmenubutton">getChatMenuButton</a> for managing the behavior of the bot's menu button in private chats.</li>
|
||||
<li>Added the class <a href="/bots/api#chatadministratorrights">ChatAdministratorRights</a> and the methods <a href="/bots/api#setmydefaultadministratorrights">setMyDefaultAdministratorRights</a> and <a href="/bots/api#getmydefaultadministratorrights">getMyDefaultAdministratorRights</a> for managing the bot's default administrator rights.</li>
|
||||
<li>Added support for t.me links that can be used to add the bot to groups and channels as an administrator.</li>
|
||||
<li>Added the field <em>last_synchronization_error_date</em> to the class <a href="/bots/api#webhookinfo">WebhookInfo</a>.</li>
|
||||
<li>Renamed the field <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the class <a href="/bots/api#chatmemberadministrator">ChatMemberAdministrator</a>. The old field will remain temporarily available.</li>
|
||||
<li>Renamed the parameter <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the method <a href="/bots/api#promotechatmember">promoteChatMember</a>. The old parameter will remain temporarily available.</li>
|
||||
<li>Renamed the fields <em>voice_chat_scheduled</em>, <em>voice_chat_started</em>, <em>voice_chat_ended</em>, and <em>voice_chat_participants_invited</em> to <em>video_chat_scheduled</em>, <em>video_chat_started</em>, <em>video_chat_ended</em>, and <em>video_chat_participants_invited</em> in the class <a href="/bots/api#message">Message</a>. The old fields will remain temporarily available.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After the next update, only HTTPS links will be allowed in <em>login_url</em> inline keyboard buttons.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="january-31-2022" href="#january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h3>
|
||||
<p><strong>Bot API 5.7</strong></p>
|
||||
<ul>
|
||||
|
|
|
@ -50,6 +50,26 @@ To learn how to create…">
|
|||
<blockquote>
|
||||
<p>Subscribe to <a href="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <a href="https://t.me/bottalk">@BotTalk</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="april-16-2022" href="#april-16-2022"><i class="anchor-icon"></i></a>April 16, 2022</h4>
|
||||
<p><strong>Bot API 6.0</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <strong>Web Apps</strong>, see the <a href="/bots/webapps">detailed manual here</a>. (<a href="https://telegram.org/blog/notifications-bots">blog announcement</a>)</li>
|
||||
<li>Added the class <a href="#webappinfo">WebAppInfo</a> and the fields <em>web_app</em> to the classes <a href="#keyboardbutton">KeyboardButton</a> and <a href="#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added the class <a href="#sentwebappmessage">SentWebAppMessage</a> and the method <a href="#answerwebappquery">answerWebAppQuery</a> for sending an answer to a Web App query, which originated from an inline button of the 'web_app' type.</li>
|
||||
<li>Added the class <a href="#webappdata">WebAppData</a> and the field <em>web_app_data</em> to the class <a href="#message">Message</a>.</li>
|
||||
<li>Added the class <a href="#menubutton">MenuButton</a> and the methods <a href="#setchatmenubutton">setChatMenuButton</a> and <a href="#getchatmenubutton">getChatMenuButton</a> for managing the behavior of the bot's menu button in private chats.</li>
|
||||
<li>Added the class <a href="#chatadministratorrights">ChatAdministratorRights</a> and the methods <a href="#setmydefaultadministratorrights">setMyDefaultAdministratorRights</a> and <a href="#getmydefaultadministratorrights">getMyDefaultAdministratorRights</a> for managing the bot's default administrator rights.</li>
|
||||
<li>Added support for t.me links that can be used to add the bot to groups and channels as an administrator.</li>
|
||||
<li>Added the field <em>last_synchronization_error_date</em> to the class <a href="#webhookinfo">WebhookInfo</a>.</li>
|
||||
<li>Renamed the field <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the class <a href="#chatmemberadministrator">ChatMemberAdministrator</a>. The old field will remain temporarily available.</li>
|
||||
<li>Renamed the parameter <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the method <a href="#promotechatmember">promoteChatMember</a>. The old parameter will remain temporarily available.</li>
|
||||
<li>Renamed the fields <em>voice_chat_scheduled</em>, <em>voice_chat_started</em>, <em>voice_chat_ended</em>, and <em>voice_chat_participants_invited</em> to <em>video_chat_scheduled</em>, <em>video_chat_started</em>, <em>video_chat_ended</em>, and <em>video_chat_participants_invited</em> in the class <a href="#message">Message</a>. The old fields will remain temporarily available.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After the next update, only HTTPS links will be allowed in <em>login_url</em> inline keyboard buttons.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h4><a class="anchor" name="january-31-2022" href="#january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h4>
|
||||
<p><strong>Bot API 5.7</strong></p>
|
||||
<ul>
|
||||
|
@ -79,16 +99,6 @@ To learn how to create…">
|
|||
<p><strong>Note:</strong> After this update it will become impossible to forward messages from some chats. Use the fields <em>has_protected_content</em> in the classes <a href="#message">Message</a> and <a href="#chat">Chat</a> to check this.</p>
|
||||
<p><strong>Note:</strong> After this update users are able to send messages on behalf of channels they own. Bots are expected to use the field <em>sender_chat</em> in the class <a href="#message">Message</a> to correctly support such messages.</p>
|
||||
<p><strong>Note:</strong> As previously announced, user identifiers can now have up to 52 significant bits and require a 64-bit integer or double-precision float type to be stored safely.</p>
|
||||
<h4><a class="anchor" name="november-5-2021" href="#november-5-2021"><i class="anchor-icon"></i></a>November 5, 2021</h4>
|
||||
<p><strong>Bot API 5.4</strong></p>
|
||||
<ul>
|
||||
<li>Added the the parameter <code>creates_join_request</code> to the methods <a href="#createchatinvitelink">createChatInviteLink</a> and <a href="#editchatinvitelink">editChatInviteLink</a> for managing chat invite links that create join requests (read more about this on our <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#join-requests-for-groups-and-channels">blog</a>).</li>
|
||||
<li>Added the fields <code>creates_join_request</code> and <code>pending_join_request_count</code> to the class <a href="#chatinvitelink">ChatInviteLink</a>.</li>
|
||||
<li>Added the field <code>name</code> to the class <a href="#chatinvitelink">ChatInviteLink</a> and the parameters <code>name</code> to the methods <a href="#createchatinvitelink">createChatInviteLink</a> and <a href="#editchatinvitelink">editChatInviteLink</a> for managing <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#unique-names-for-invite-links">invite link names</a>.</li>
|
||||
<li>Added updates about new requests to join the chat, represented by the class <a href="#chatjoinrequest">ChatJoinRequest</a> and the field <em>chat_join_request</em> in the <a href="#update">Update</a> class. The bot must be an administrator in the chat with the <em>can_invite_users</em> administrator right to receive these updates.</li>
|
||||
<li>Added the methods <a href="#approvechatjoinrequest">approveChatJoinRequest</a> and <a href="#declinechatjoinrequest">declineChatJoinRequest</a> for managing requests to join the chat.</li>
|
||||
<li>Added support for the <em>choose_sticker</em> action in the method <a href="#sendchataction">sendChatAction</a>.</li>
|
||||
</ul>
|
||||
<p><strong><a href="/bots/api-changelog">See earlier changes »</a></strong></p>
|
||||
<h3><a class="anchor" name="authorizing-your-bot" href="#authorizing-your-bot"><i class="anchor-icon"></i></a>Authorizing your bot</h3>
|
||||
<p>Each bot is given a unique authentication token <a href="/bots#6-botfather">when it is created</a>. The token looks something like <code>123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11</code>, but we'll use simply <strong><token></strong> in this document instead. You can learn about obtaining tokens and generating new ones in <a href="https://core.telegram.org/bots#6-botfather">this document</a>.</p>
|
||||
|
@ -377,6 +387,11 @@ To learn how to create…">
|
|||
<td><em>Optional</em>. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>last_synchronization_error_date</td>
|
||||
<td>Integer</td>
|
||||
<td><em>Optional</em>. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>max_connections</td>
|
||||
<td>Integer</td>
|
||||
<td><em>Optional</em>. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery</td>
|
||||
|
@ -842,24 +857,29 @@ To learn how to create…">
|
|||
<td><em>Optional</em>. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_scheduled</td>
|
||||
<td><a href="#voicechatscheduled">VoiceChatScheduled</a></td>
|
||||
<td><em>Optional</em>. Service message: voice chat scheduled</td>
|
||||
<td>video_chat_scheduled</td>
|
||||
<td><a href="#videochatscheduled">VideoChatScheduled</a></td>
|
||||
<td><em>Optional</em>. Service message: video chat scheduled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_started</td>
|
||||
<td><a href="#voicechatstarted">VoiceChatStarted</a></td>
|
||||
<td><em>Optional</em>. Service message: voice chat started</td>
|
||||
<td>video_chat_started</td>
|
||||
<td><a href="#videochatstarted">VideoChatStarted</a></td>
|
||||
<td><em>Optional</em>. Service message: video chat started</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_ended</td>
|
||||
<td><a href="#voicechatended">VoiceChatEnded</a></td>
|
||||
<td><em>Optional</em>. Service message: voice chat ended</td>
|
||||
<td>video_chat_ended</td>
|
||||
<td><a href="#videochatended">VideoChatEnded</a></td>
|
||||
<td><em>Optional</em>. Service message: video chat ended</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>voice_chat_participants_invited</td>
|
||||
<td><a href="#voicechatparticipantsinvited">VoiceChatParticipantsInvited</a></td>
|
||||
<td><em>Optional</em>. Service message: new participants invited to a voice chat</td>
|
||||
<td>video_chat_participants_invited</td>
|
||||
<td><a href="#videochatparticipantsinvited">VideoChatParticipantsInvited</a></td>
|
||||
<td><em>Optional</em>. Service message: new participants invited to a video chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app_data</td>
|
||||
<td><a href="#webappdata">WebAppData</a></td>
|
||||
<td><em>Optional</em>. Service message: data sent by a Web App</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>reply_markup</td>
|
||||
|
@ -1546,6 +1566,29 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="webappdata" href="#webappdata"><i class="anchor-icon"></i></a>WebAppData</h4>
|
||||
<p>Contains data sent from a <a href="/bots/webapps">Web App</a> to the bot.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>data</td>
|
||||
<td>String</td>
|
||||
<td>The data. Be aware that a bad client can send arbitrary data in this field.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>button_text</td>
|
||||
<td>String</td>
|
||||
<td>Text of the <em>web_app</em> keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="proximityalerttriggered" href="#proximityalerttriggered"><i class="anchor-icon"></i></a>ProximityAlertTriggered</h4>
|
||||
<p>This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.</p>
|
||||
<table class="table">
|
||||
|
@ -1592,8 +1635,8 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="voicechatscheduled" href="#voicechatscheduled"><i class="anchor-icon"></i></a>VoiceChatScheduled</h4>
|
||||
<p>This object represents a service message about a voice chat scheduled in the chat.</p>
|
||||
<h4><a class="anchor" name="videochatscheduled" href="#videochatscheduled"><i class="anchor-icon"></i></a>VideoChatScheduled</h4>
|
||||
<p>This object represents a service message about a video chat scheduled in the chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1606,14 +1649,14 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>start_date</td>
|
||||
<td>Integer</td>
|
||||
<td>Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator</td>
|
||||
<td>Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="voicechatstarted" href="#voicechatstarted"><i class="anchor-icon"></i></a>VoiceChatStarted</h4>
|
||||
<p>This object represents a service message about a voice chat started in the chat. Currently holds no information.</p>
|
||||
<h4><a class="anchor" name="voicechatended" href="#voicechatended"><i class="anchor-icon"></i></a>VoiceChatEnded</h4>
|
||||
<p>This object represents a service message about a voice chat ended in the chat.</p>
|
||||
<h4><a class="anchor" name="videochatstarted" href="#videochatstarted"><i class="anchor-icon"></i></a>VideoChatStarted</h4>
|
||||
<p>This object represents a service message about a video chat started in the chat. Currently holds no information.</p>
|
||||
<h4><a class="anchor" name="videochatended" href="#videochatended"><i class="anchor-icon"></i></a>VideoChatEnded</h4>
|
||||
<p>This object represents a service message about a video chat ended in the chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1626,12 +1669,12 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>duration</td>
|
||||
<td>Integer</td>
|
||||
<td>Voice chat duration in seconds</td>
|
||||
<td>Video chat duration in seconds</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="voicechatparticipantsinvited" href="#voicechatparticipantsinvited"><i class="anchor-icon"></i></a>VoiceChatParticipantsInvited</h4>
|
||||
<p>This object represents a service message about new members invited to a voice chat.</p>
|
||||
<h4><a class="anchor" name="videochatparticipantsinvited" href="#videochatparticipantsinvited"><i class="anchor-icon"></i></a>VideoChatParticipantsInvited</h4>
|
||||
<p>This object represents a service message about new members invited to a video chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1644,7 +1687,7 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>users</td>
|
||||
<td>Array of <a href="#user">User</a></td>
|
||||
<td><em>Optional</em>. New members that were invited to the voice chat</td>
|
||||
<td>New members that were invited to the video chat</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1707,6 +1750,24 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="webappinfo" href="#webappinfo"><i class="anchor-icon"></i></a>WebAppInfo</h4>
|
||||
<p>Contains information about a <a href="/bots/webapps">Web App</a>.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>url</td>
|
||||
<td>String</td>
|
||||
<td>An HTTPS URL of a Web App to be opened with additional data as specified in <a href="/bots/webapps#initializing-web-apps">Initializing Web Apps</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="replykeyboardmarkup" href="#replykeyboardmarkup"><i class="anchor-icon"></i></a>ReplyKeyboardMarkup</h4>
|
||||
<p>This object represents a <a href="https://core.telegram.org/bots#keyboards">custom keyboard</a> with reply options (see <a href="https://core.telegram.org/bots#keyboards">Introduction to bots</a> for details and examples).</p>
|
||||
<table class="table">
|
||||
|
@ -1746,7 +1807,7 @@ To learn how to create…">
|
|||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="keyboardbutton" href="#keyboardbutton"><i class="anchor-icon"></i></a>KeyboardButton</h4>
|
||||
<p>This object represents one button of the reply keyboard. For simple text buttons <em>String</em> can be used instead of this object to specify text of the button. Optional fields <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p>
|
||||
<p>This object represents one button of the reply keyboard. For simple text buttons <em>String</em> can be used instead of this object to specify text of the button. Optional fields <em>web_app</em>, <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1764,21 +1825,26 @@ To learn how to create…">
|
|||
<tr>
|
||||
<td>request_contact</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>request_location</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's current location will be sent when the button is pressed. Available in private chats only</td>
|
||||
<td><em>Optional</em>. If <em>True</em>, the user's current location will be sent when the button is pressed. Available in private chats only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>request_poll</td>
|
||||
<td><a href="#keyboardbuttonpolltype">KeyboardButtonPollType</a></td>
|
||||
<td><em>Optional</em>. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only</td>
|
||||
<td><em>Optional</em>. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app</td>
|
||||
<td><a href="#webappinfo">WebAppInfo</a></td>
|
||||
<td><em>Optional</em>. If specified, the described <a href="/bots/webapps">Web App</a> will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.</p>
|
||||
<p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong> <em>web_app</em> option will only work in Telegram versions released after 16 April, 2022. Older clients will display <em>unsupported message</em>.</p>
|
||||
<h4><a class="anchor" name="keyboardbuttonpolltype" href="#keyboardbuttonpolltype"><i class="anchor-icon"></i></a>KeyboardButtonPollType</h4>
|
||||
<p>This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.</p>
|
||||
<table class="table">
|
||||
|
@ -1861,16 +1927,21 @@ To learn how to create…">
|
|||
<td><em>Optional</em>. HTTP or tg:// url to be opened when the button is pressed. Links <code>tg://user?id=<user_id></code> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_url</td>
|
||||
<td><a href="#loginurl">LoginUrl</a></td>
|
||||
<td><em>Optional</em>. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the <a href="https://core.telegram.org/widgets/login">Telegram Login Widget</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>callback_data</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Data to be sent in a <a href="#callbackquery">callback query</a> to the bot when button is pressed, 1-64 bytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app</td>
|
||||
<td><a href="#webappinfo">WebAppInfo</a></td>
|
||||
<td><em>Optional</em>. Description of the <a href="/bots/webapps">Web App</a> that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href="#answerwebappquery">answerWebAppQuery</a>. Available only in private chats between a user and the bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_url</td>
|
||||
<td><a href="#loginurl">LoginUrl</a></td>
|
||||
<td><em>Optional</em>. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the <a href="https://core.telegram.org/widgets/login">Telegram Login Widget</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>switch_inline_query</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted.<br><br><strong>Note:</strong> This offers an easy way for users to start using your bot in <a href="/bots/inline">inline mode</a> when they are currently in a private chat with it. Especially useful when combined with <a href="#answerinlinequery"><em>switch_pm…</em></a> actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.</td>
|
||||
|
@ -2111,6 +2182,74 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="chatadministratorrights" href="#chatadministratorrights"><i class="anchor-icon"></i></a>ChatAdministratorRights</h4>
|
||||
<p>Represents the rights of an administrator in a chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>is_anonymous</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the user's presence in the chat is hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_chat</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_delete_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can delete messages of other users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_video_chats</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can manage video chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_restrict_members</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can restrict, ban or unban chat members</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_promote_members</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_change_info</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the user is allowed to change the chat title, photo and other settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_invite_users</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the user is allowed to invite new users to the chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_post_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_edit_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; channels only</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_pin_messages</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; groups and supergroups only</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="chatmember" href="#chatmember"><i class="anchor-icon"></i></a>ChatMember</h4>
|
||||
<p>This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:</p>
|
||||
<ul>
|
||||
|
@ -2196,9 +2335,9 @@ To learn how to create…">
|
|||
<td><em>True</em>, if the administrator can delete messages of other users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_voice_chats</td>
|
||||
<td>can_manage_video_chats</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em>, if the administrator can manage voice chats</td>
|
||||
<td><em>True</em>, if the administrator can manage video chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_restrict_members</td>
|
||||
|
@ -2752,6 +2891,78 @@ To learn how to create…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="menubutton" href="#menubutton"><i class="anchor-icon"></i></a>MenuButton</h4>
|
||||
<p>This object describes the bot's menu button in a private chat. It should be one of</p>
|
||||
<ul>
|
||||
<li><a href="#menubuttoncommands">MenuButtonCommands</a></li>
|
||||
<li><a href="#menubuttonwebapp">MenuButtonWebApp</a></li>
|
||||
<li><a href="#menubuttondefault">MenuButtonDefault</a></li>
|
||||
</ul>
|
||||
<p>If a menu button other than <a href="#menubuttondefault">MenuButtonDefault</a> is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.</p>
|
||||
<h4><a class="anchor" name="menubuttoncommands" href="#menubuttoncommands"><i class="anchor-icon"></i></a>MenuButtonCommands</h4>
|
||||
<p>Represents a menu button, which opens the bot's list of commands.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td>Type of the button, must be <em>commands</em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="menubuttonwebapp" href="#menubuttonwebapp"><i class="anchor-icon"></i></a>MenuButtonWebApp</h4>
|
||||
<p>Represents a menu button, which launches a <a href="/bots/webapps">Web App</a>.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td>Type of the button, must be <em>web_app</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>text</td>
|
||||
<td>String</td>
|
||||
<td>Text on the button</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>web_app</td>
|
||||
<td><a href="#webappinfo">WebAppInfo</a></td>
|
||||
<td>Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href="#answerwebappquery">answerWebAppQuery</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="menubuttondefault" href="#menubuttondefault"><i class="anchor-icon"></i></a>MenuButtonDefault</h4>
|
||||
<p>Describes that no specific value for the menu button was set.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td>Type of the button, must be <em>default</em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="responseparameters" href="#responseparameters"><i class="anchor-icon"></i></a>ResponseParameters</h4>
|
||||
<p>Contains information about why a request was unsuccessful.</p>
|
||||
<table class="table">
|
||||
|
@ -4812,10 +5023,10 @@ pre-formatted fixed-width code block written in the Python programming language
|
|||
<td>Pass <em>True</em>, if the administrator can delete messages of other users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_manage_voice_chats</td>
|
||||
<td>can_manage_video_chats</td>
|
||||
<td>Boolean</td>
|
||||
<td>Optional</td>
|
||||
<td>Pass <em>True</em>, if the administrator can manage voice chats</td>
|
||||
<td>Pass <em>True</em>, if the administrator can manage video chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_restrict_members</td>
|
||||
|
@ -5613,6 +5824,98 @@ pre-formatted fixed-width code block written in the Python programming language
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="setchatmenubutton" href="#setchatmenubutton"><i class="anchor-icon"></i></a>setChatMenuButton</h4>
|
||||
<p>Use this method to change the bot's menu button in a private chat, or the default menu button. Returns <em>True</em> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>chat_id</td>
|
||||
<td>Integer</td>
|
||||
<td>Optional</td>
|
||||
<td>Unique identifier for the target private chat. If not specified, default bot's menu button will be changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>menu_button</td>
|
||||
<td><a href="#menubutton">MenuButton</a></td>
|
||||
<td>Optional</td>
|
||||
<td>A JSON-serialized object for the new bot's menu button. Defaults to <a href="#menubuttondefault">MenuButtonDefault</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="getchatmenubutton" href="#getchatmenubutton"><i class="anchor-icon"></i></a>getChatMenuButton</h4>
|
||||
<p>Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns <a href="#menubutton">MenuButton</a> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>chat_id</td>
|
||||
<td>Integer</td>
|
||||
<td>Optional</td>
|
||||
<td>Unique identifier for the target private chat. If not specified, default bot's menu button will be returned</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="setmydefaultadministratorrights" href="#setmydefaultadministratorrights"><i class="anchor-icon"></i></a>setMyDefaultAdministratorRights</h4>
|
||||
<p>Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns <em>True</em> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>rights</td>
|
||||
<td><a href="#chatadministratorrights">ChatAdministratorRights</a></td>
|
||||
<td>Optional</td>
|
||||
<td>A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>for_channels</td>
|
||||
<td>Boolean</td>
|
||||
<td>Optional</td>
|
||||
<td>Pass <em>True</em> to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="getmydefaultadministratorrights" href="#getmydefaultadministratorrights"><i class="anchor-icon"></i></a>getMyDefaultAdministratorRights</h4>
|
||||
<p>Use this method to get the current default administrator rights of the bot. Returns <a href="#chatadministratorrights">ChatAdministratorRights</a> on success.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>for_channels</td>
|
||||
<td>Boolean</td>
|
||||
<td>Optional</td>
|
||||
<td>Pass <em>True</em> to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="inline-mode-methods" href="#inline-mode-methods"><i class="anchor-icon"></i></a>Inline mode methods</h4>
|
||||
<p>Methods and objects used in the inline mode are described in the <a href="#inline-mode">Inline mode section</a>.</p>
|
||||
<h3><a class="anchor" name="updating-messages" href="#updating-messages"><i class="anchor-icon"></i></a>Updating messages</h3>
|
||||
|
@ -8135,6 +8438,50 @@ pre-formatted fixed-width code block written in the Python programming language
|
|||
</tbody>
|
||||
</table>
|
||||
<p><strong>Note:</strong> It is necessary to enable <a href="/bots/inline#collecting-feedback">inline feedback</a> via <a href="https://t.me/botfather">@Botfather</a> in order to receive these objects in updates.</p>
|
||||
<h4><a class="anchor" name="answerwebappquery" href="#answerwebappquery"><i class="anchor-icon"></i></a>answerWebAppQuery</h4>
|
||||
<p>Use this method to set the result of an interaction with a <a href="/bots/webapps">Web App</a> and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a <a href="#sentwebappmessage">SentWebAppMessage</a> object is returned.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>web_app_query_id</td>
|
||||
<td>String</td>
|
||||
<td>Yes</td>
|
||||
<td>Unique identifier for the query to be answered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>result</td>
|
||||
<td><a href="#inlinequeryresult">InlineQueryResult</a></td>
|
||||
<td>Yes</td>
|
||||
<td>A JSON-serialized object describing the message to be sent</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="sentwebappmessage" href="#sentwebappmessage"><i class="anchor-icon"></i></a>SentWebAppMessage</h4>
|
||||
<p>Contains information about an inline message sent by a <a href="/bots/webapps">Web App</a> on behalf of a user.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>inline_message_id</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Identifier of the sent inline message. Available only if there is an <a href="#inlinekeyboardmarkup">inline keyboard</a> attached to the message.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" name="payments" href="#payments"><i class="anchor-icon"></i></a>Payments</h3>
|
||||
<p>Your bot can accept payments from Telegram users. Please see the <a href="/bots/payments">introduction to payments</a> for more details on the process and how to set up payments for your bot. Please note that users will need Telegram v.4.0 or higher to use payments (released on May 18, 2017).</p>
|
||||
<h4><a class="anchor" name="sendinvoice" href="#sendinvoice"><i class="anchor-icon"></i></a>sendInvoice</h4>
|
||||
|
|
587
data/corefork.telegram.org/bots/webapps.html
Normal file
587
data/corefork.telegram.org/bots/webapps.html
Normal file
|
@ -0,0 +1,587 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Web Apps for Bots</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Telegram bots can completely replace any website. They support seamless authorization, integrated payments via 15 payment…">
|
||||
<meta property="og:title" content="Web Apps for Bots">
|
||||
<meta property="og:image" content="https://corefork.telegram.org/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750">
|
||||
<meta property="og:description" content="Telegram bots can completely replace any website. They support seamless authorization, integrated payments via 15 payment…">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
||||
<link href="/css/telegram.css?224" rel="stylesheet" media="screen">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body class="preload">
|
||||
<div class="dev_page_wrap">
|
||||
<div class="dev_page_head navbar navbar-static-top navbar-tg">
|
||||
<div class="navbar-inner">
|
||||
<div class="container clearfix">
|
||||
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="//telegram.org/">Home</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
|
||||
<li class=""><a href="/api">API</a></li>
|
||||
<li class=""><a href="/mtproto">Protocol</a></li>
|
||||
<li class=""><a href="/schema">Schema</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container clearfix">
|
||||
<div class="dev_page">
|
||||
<div id="dev_page_content_wrap" class=" ">
|
||||
<div class="dev_page_bread_crumbs"></div>
|
||||
<h1 id="dev_page_title">Web Apps for Bots</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Telegram bots can completely replace <strong>any website</strong>. They support <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">seamless authorization</a>, <a href="https://core.telegram.org/bots/payments">integrated payments</a> via <strong>15</strong> payment providers (with <em>Google Pay</em> and <em>Apple Pay</em> out of the box), delivering tailored push notifications to users, and <a href="https://core.telegram.org/bots">much more</a>.</p>
|
||||
<p>With <strong>Web Apps</strong>, bots get a whole new dimension. Bot developers can create <strong>infinitely flexible interfaces</strong> with <em>JavaScript</em>, the most widely used programming language in the world.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001434/100bf/eWprjdgzEbE.100386/644bbea83084f44c8f" style="max-width: 600px;" title="console.log('Vive la révolution')" alt="Bot Revolution">
|
||||
<source src="/file/464001679/11aa9/KQx_BlPVXRo.4922145.mp4/c65433c8ac11a347a8" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>To see a <strong>Web App</strong> in action, try our sample <a href="https://t.me/durgerkingbot">@DurgerKingBot</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="designing-web-apps" href="#designing-web-apps"><i class="anchor-icon"></i></a>Designing Web Apps</h3>
|
||||
<h4><a class="anchor" name="color-schemes" href="#color-schemes"><i class="anchor-icon"></i></a>Color Schemes</h4>
|
||||
<p>Web Apps always receive data about the user's current <strong>color theme</strong> in real time, so you can adjust the appearance of your interfaces to match it. For example, when users switch between <strong>Day and Night</strong> modes or use various <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more#global-chat-themes-on-android">custom themes</a>.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001576/10249/wikoQUNnrH4.112118/7b6c8d3366ada2615b" style="max-width: 600px;" title="" alt="Switching Colors">
|
||||
<source src="/file/464001257/12087/QNQUbIi864k.909800.mp4/8ea7adad7db407388e" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="#themeparams">Jump to technical information</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="design-guidelines" href="#design-guidelines"><i class="anchor-icon"></i></a>Design Guidelines</h4>
|
||||
<p>Telegram apps are known for being snappy, smooth and following a consistent cross-platform design. Your Web App should ideally reflect these principles.</p>
|
||||
<ul>
|
||||
<li>All elements should be responsive and designed with a mobile-first approach.</li>
|
||||
<li>Interactive elements should mimic the style, behavior and intent of UI components that already exist.</li>
|
||||
<li>All included animations should be smooth, ideally 60fps.</li>
|
||||
<li>All inputs and images should contain labels for accessibility purposes.</li>
|
||||
<li>The app should deliver a seamless experience by monitoring the <a href="#color-schemes">dynamic theme-based colors</a> provided by the API and using them accordingly.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="implementing-web-apps" href="#implementing-web-apps"><i class="anchor-icon"></i></a>Implementing Web Apps</h3>
|
||||
<p>Telegram currently supports four different ways of launching Web Apps: from a <a href="#keyboard-button-web-apps">keyboard button</a>, from an <a href="#inline-button-web-apps">inline button</a>, from the <a href="#launching-web-apps-from-the-menu-button">bot menu button</a> – and even from the <a href="#launching-web-apps-from-the-attachment-menu">attachment menu</a>.</p>
|
||||
<div class="blog_image_wrap blog_medium_image_wrap">
|
||||
<a href="/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750" target="_blank"><img src="/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750" title="" alt="Types of buttons" srcset="/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750 , 2x" /></a>
|
||||
</div>
|
||||
|
||||
<h4><a class="anchor" name="keyboard-button-web-apps" href="#keyboard-button-web-apps"><i class="anchor-icon"></i></a>Keyboard Button Web Apps</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web Apps launched from a <strong>web_app</strong> type <a href="/bots/api#keyboardbutton">keyboard button</a> can send data back to the bot in a <em>service message</em> using <a href="#initializing-web-apps">Telegram.WebApp.sendData</a>. This makes it possible for the bot to produce a response without communicating with any external servers.</p>
|
||||
</blockquote>
|
||||
<p>Users can interact with bots using <a href="https://core.telegram.org/bots#keyboards">custom keyboards</a>, <a href="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">buttons under bot messages</a>, as well as by sending freeform <strong>text messages</strong> or any of the <strong>attachment types</strong> supported by Telegram: photos and videos, files, locations, contacts and polls. For even more flexibility, bots can utilize the full power of <strong>HTML5</strong> to create user-friendly input interfaces.</p>
|
||||
<p>You can send a <strong>web_app</strong> type <a href="/bots/api#keyboardbutton">KeyboardButton</a> that opens a Web App from the specified URL.</p>
|
||||
<p>To transmit data from the user back to the bot, the Web App can call the <a href="#initializing-web-apps">Telegram.WebApp.sendData</a> method. Data will be transmitted to the bot as a String in a service message. The bot can continue communicating with the user after receiving it.</p>
|
||||
<p><strong>Good for:</strong></p>
|
||||
<ul>
|
||||
<li><strong>Сustom data input interfaces</strong> (a personalized calendar for selecting dates; selecting data from a list with advanced search options; a randomizer that lets the user “spin a wheel” and chooses one of the available options, etc.)</li>
|
||||
<li><strong>Reusable components</strong> that do not depend on a particular bot.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="inline-button-web-apps" href="#inline-button-web-apps"><i class="anchor-icon"></i></a>Inline Button Web Apps</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> For more interactive Web Apps like <a href="https://t.me/durgerkingbot">@DurgerKingBot</a>, use a <strong>web_app</strong> type <a href="/bots/api#inlinekeyboardbutton">Inline KeyboardButton</a>, which gets basic user information and can be used to send a message on behalf of the user to the chat with the bot.</p>
|
||||
</blockquote>
|
||||
<p>If receiving text data alone is insufficient or you need a more advanced and personalized interface, you can open a Web App using a <strong>web_app</strong> type <a href="/bots/api#inlinekeyboardbutton">Inline KeyboardButton</a>.</p>
|
||||
<p>From the button, a Web App will open with the URL specified in the button. In addition to the user's <a href="#color-schemes">theme settings</a>, it will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>) and a unique identifier for the session, <strong>query_id</strong>, which allows messages on behalf of the user to be sent back to the bot.</p>
|
||||
<p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> to send an inline message from the user back to the bot and close the Web App. After receiving the message, the bot can continue communicating with the user.</p>
|
||||
<p><strong>Good for:</strong></p>
|
||||
<ul>
|
||||
<li>Fully-fledged web services and integrations of any kind.</li>
|
||||
<li>The use cases are effectively <strong>unlimited</strong>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="launching-web-apps-from-the-menu-button" href="#launching-web-apps-from-the-menu-button"><i class="anchor-icon"></i></a>Launching Web Apps from the Menu Button</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web Apps can be launched from a customized menu button. This simply offers a quicker way to access the app and is otherwise <strong>identical</strong> to <a href="#inline-button-web-apps">launching a Web App from an inline button</a>.</p>
|
||||
</blockquote>
|
||||
<p>By default, chats with bots always show a convenient <strong>menu button</strong> that provides quick access to all listed <a href="/bots#commands">commands</a>. With <a href="https://core.telegram.org/bots/api-changelog#april-XX-2022">Bot API 6.0</a>, this button can be used to <strong>launch a Web App</strong> instead.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001829/12247/e6LoU12o4Ng.109921/1226afb8f18f8ea8c4
|
||||
" style="max-width: 600px;" title="" alt="Menu Button">
|
||||
<source src="/file/464001838/10fa2/WrJmkuIMan0.1217917.mp4/e25a5f31bc4e6493f7" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<p>To configure the menu button, you must specify the text it should show and the Web App URL. There are two ways to set these parameters:</p>
|
||||
<ul>
|
||||
<li>To customize the button for <strong>all users</strong>, use <a href="https://t.me/botfather">@BotFather</a> (the <code>/setmenubutton</code> command or <em>Bot Settings > Menu Button</em>).</li>
|
||||
<li>To customize the button for both <strong>all users</strong> and <strong>specific users</strong>, use the <a href="/bots/api#setchatmenubutton">setChatMenuButton</a> method in the Bot API. For example, change the button text according to the user's language, or show links to different Web Apps based on a user's settings in your bot.</li>
|
||||
</ul>
|
||||
<p>Apart from this, Web Apps opened via the menu button work in the exact same way as when <a href="#inline-button-web-apps">using inline buttons</a>.</p>
|
||||
<blockquote>
|
||||
<p><a href="https://t.me/durgerkingbot">@DurgerKingBot</a> allows launching its Web App both from an inline button and from the menu button.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="launching-web-apps-from-the-attachment-menu" href="#launching-web-apps-from-the-attachment-menu"><i class="anchor-icon"></i></a>Launching Web Apps from the Attachment Menu</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web App Bots can request to be added directly to a user's attachment menu, allowing them to be quickly launched from any private chat. To try this mode, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in any <strong>private chat</strong>.</p>
|
||||
</blockquote>
|
||||
<p>Web App Bots can request to be added directly to a user's attachment menu, allowing them to be quickly launched from <strong>any private chat</strong> (with either a <em>user</em> or <em>another bot</em>).</p>
|
||||
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>.</p>
|
||||
<p>To enable this feature for your bot, open <a href="https://t.me/botfather">@BotFather</a> <a href="#using-bots-in-the-test-environment">from an account on the test server</a> and send the <code>/setattach</code> command – or go to <em>Bot Settings > Configure Attachment Menu</em>. Then specify the URL that will be opened to launch the bot's Web App via its icon in the attachment menu.</p>
|
||||
<p>In addition to the user's <a href="#color-schemes">theme settings</a>, the bot will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>, <code>photo</code>), as well as public info about the chat partner (<code>ID</code>, <code>name</code>, <code>username</code>, <code>photo</code>) and a unique identifier for the web view session <strong>query_id</strong>, which allows messages of any type to be sent to the chat on behalf of the user that opened the bot.</p>
|
||||
<p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a>, which sends an inline message from the user via the bot to the private chat where it was launched and closes the Web App.</p>
|
||||
<blockquote>
|
||||
<p>You can read more about adding bots to the attachment menu <a href="#adding-bots-to-the-attachment-menu">here</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="initializing-web-apps" href="#initializing-web-apps"><i class="anchor-icon"></i></a>Initializing Web Apps</h3>
|
||||
<p>To connect your Web App to the Telegram client, place the script <a href="https://telegram.org/js/telegram-web-app.js">telegram-web-app.js</a> in the <code><head></code> tag before any other scripts, using this code:</p>
|
||||
<pre><code><script src="https://telegram.org/js/telegram-web-app.js"></script></code></pre>
|
||||
<p>Once the script is connected, a <code>window.Telegram.WebApp</code> object will become available with the following fields:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>initData</td>
|
||||
<td>String</td>
|
||||
<td>A string with raw data transferred to the Web App, convenient for <a href="#validating-data-received-via-the-web-app">validating data</a>.<br><strong>WARNING:</strong> <a href="#validating-data-received-via-the-web-app">Validate data</a> from this field before using it on the bot's server.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>initDataUnsafe</td>
|
||||
<td><a href="#webappinitdata">WebAppInitData</a></td>
|
||||
<td>An object with input data transferred to the Web App.<br><strong>WARNING:</strong> Data from this field should not be trusted. You should only use data from <em>initData</em> on the bot's server and only after it has been <a href="#validating-data-received-via-the-web-app">validated</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>colorScheme</td>
|
||||
<td>String</td>
|
||||
<td>The color scheme currently used in the Telegram app. Either “light” or “dark”.<br>Also available as the CSS variable <code>var(--tg-color-scheme)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>themeParams</td>
|
||||
<td><a href="#themeparams">ThemeParams</a></td>
|
||||
<td>An object containing the current theme settings used in the Telegram app.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>isExpanded</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>True</em> if the Web App is expanded to the maximum available height. False, if the Web App occupies part of the screen and can be expanded to the full height using the <strong>expand()</strong> method.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>viewportHeight</td>
|
||||
<td>Float</td>
|
||||
<td>The current height of the visible area of the Web App. Also available in CSS as the variable <code>var(--tg-viewport-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. As the position of the Web App changes, the current height value of the visible area will be updated in real time.<br><br>Please note that the refresh rate of this value is not sufficient to smoothly follow the lower border of the window. It should not be used to pin interface elements to the bottom of the visible area. It's more appropriate to use the value of the <code>viewportStableHeight</code> field for this purpose.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>viewportStableHeight</td>
|
||||
<td>Float</td>
|
||||
<td>The height of the visible area of the Web App in its last stable state. Also available in CSS as a variable <code>var(--tg-viewport-stable-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. Unlike the value of <code>viewportHeight</code>, the value of <code>viewportStableHeight</code> does not change as the position of the Web App changes with user gestures or during animations. The value of <code>viewportStableHeight</code> will be updated after all gestures and animations are completed and the Web App reaches its final size.<br><br><em>Note the <a href="#events-available-for-web-apps">event</a> <code>viewportChanged</code> with the passed parameter <code>isStateStable=true</code>, which will allow you to track when the stable state of the height of the visible area changes.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MainButton</td>
|
||||
<td><a href="#mainbutton">MainButton</a></td>
|
||||
<td>An object for controlling the main button, which is displayed at the bottom of the Web App in the Telegram interface.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onEvent(eventType, eventHandler)</td>
|
||||
<td>Function</td>
|
||||
<td>A method that sets the app event handler. Check <a href="#events-available-for-web-apps">the list of available events</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>offEvent(eventType, eventHandler)</td>
|
||||
<td>Function</td>
|
||||
<td>A method that deletes a previously set event handler.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sendData(data)</td>
|
||||
<td>Function</td>
|
||||
<td>A method used to send data to the bot. When this method is called, a service message is sent to the bot containing the data <em>data</em> of the length up to 4096 bytes, and the Web App is closed. See the field <em>web_app_data</em> in the class <a href="/bots/api#message">Message</a>.<br><br><em>This method is only available for Web Apps launched via a <a href="#keyboard-button-web-apps">Keyboard button</a>.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ready()</td>
|
||||
<td>Function</td>
|
||||
<td>A method that informs the Telegram app that the Web App is ready to be displayed.<br>It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown.<br>If the method is not called, the placeholder will be hidden only when the page is fully loaded.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>expand()</td>
|
||||
<td>Function</td>
|
||||
<td>A method that expands the Web App to the maximum available height. To find out if the Web App is expanded to the maximum height, refer to the value of the <em>Telegram.WebApp.isExpanded</em> parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>close()</td>
|
||||
<td>Function</td>
|
||||
<td>A method that closes the Web App.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="themeparams" href="#themeparams"><i class="anchor-icon"></i></a>ThemeParams</h4>
|
||||
<p>Web Apps can <a href="#color-schemes">adjust the appearance</a> of the interface to match the Telegram user's app in real time. This object contains the user's current theme settings:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>bg_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Background color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-bg-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>text_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Main text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-text-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hint_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Hint text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-hint-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>link_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Link color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-link-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>button_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Button color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>button_text_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Button text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-text-color)</code>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="blog_image_wrap blog_medium_image_wrap">
|
||||
<a href="/file/464001058/109a6/XLMi7E5_IvY.218203/90b01ba97b6bc3ab8e" target="_blank"><img src="/file/464001058/109a6/XLMi7E5_IvY.218203/90b01ba97b6bc3ab8e" title="" alt="Color parameters guide" srcset="/file/464001058/109a6/XLMi7E5_IvY.218203/90b01ba97b6bc3ab8e , 2x" /></a>
|
||||
</div>
|
||||
|
||||
<h4><a class="anchor" name="mainbutton" href="#mainbutton"><i class="anchor-icon"></i></a>MainButton</h4>
|
||||
<p>This object controls the main button, which is displayed at the bottom of the Web App in the Telegram interface.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>text</td>
|
||||
<td>String</td>
|
||||
<td>Current button text. Set to <em>CONTINUE</em> by default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>color</td>
|
||||
<td>String</td>
|
||||
<td>Current button color. Set to <code>themeParams.button_color</code> by default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>textColor</td>
|
||||
<td>String</td>
|
||||
<td>Current button text color. Set to <code>themeParams.button_text_color</code> by default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>isVisible</td>
|
||||
<td>Boolean</td>
|
||||
<td>Shows whether the button is visible. Set to <em>false</em> by default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>isActive</td>
|
||||
<td>Boolean</td>
|
||||
<td>Shows whether the button is active. Set to <em>true</em> by default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>isProgressVisible</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Readonly.</em> Shows whether the button is displaying a loading indicator.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>setText(text)</td>
|
||||
<td>Function</td>
|
||||
<td>A method to set the button text.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onClick(callback)</td>
|
||||
<td>Function</td>
|
||||
<td>A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent('mainButtonClicked', callback)</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>show()</td>
|
||||
<td>Function</td>
|
||||
<td>A method to make the button visible.<br><em>Note that opening the Web App from the <a href="#launching-web-apps-from-the-attachment-menu">attachment menu</a> hides the main button until the user interacts with the Web App interface.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide()</td>
|
||||
<td>Function</td>
|
||||
<td>A method to hide the button.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>enable()</td>
|
||||
<td>Function</td>
|
||||
<td>A method to enable the button.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disable()</td>
|
||||
<td>Function</td>
|
||||
<td>A method to disable the button.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>showProgress(leaveActive)</td>
|
||||
<td>Function</td>
|
||||
<td>A method to show a loading indicator on the button.<br>It is recommended to display loading progress if the action tied to the button may take a long time. By default, the button is disabled while the action is in progress. If the parameter <code>leaveActive=true</code> is passed, the button remains enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hideProgress()</td>
|
||||
<td>Function</td>
|
||||
<td>A method to hide the loading indicator.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>setParams(params)</td>
|
||||
<td>Function</td>
|
||||
<td>A method to set the button parameters. The <em>params</em> parameter is an object containing one or several fields that need to be changed:<br><strong>text</strong> - button text;<br><strong>color</strong> - button color;<br><strong>text_color</strong> - button text color;<br><strong>is_active</strong> - enable the button;<br><strong>is_visible</strong> - show the button.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>All these methods return the MainButton object so they can be chained.</p>
|
||||
<h4><a class="anchor" name="webappinitdata" href="#webappinitdata"><i class="anchor-icon"></i></a>WebAppInitData</h4>
|
||||
<p>This object contains data that is transferred to the Web App when it is opened. It is empty if the Web App was launched from a <a href="#keyboard-button-web-apps">keyboard button</a>.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>query_id</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional.</em> A unique identifier for the Web App session, required for sending messages via the <a href="#answerwebappquery">answerWebAppQuery</a> method.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user</td>
|
||||
<td><a href="#webappuser">WebAppUser</a></td>
|
||||
<td><em>Optional.</em> An object containing data about the current user.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>receiver</td>
|
||||
<td><a href="#webappuser">WebAppUser</a></td>
|
||||
<td><em>Optional.</em> An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for Web Apps launched via the attachment menu.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start_param</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional.</em> The value of the <em>startattach</em> parameter, passed <a href="#adding-bots-to-the-attachment-menu">via link</a>. Only returned for Web Apps when launched from the attachment menu via link.<br><br>The value of the <code>start_param</code> parameter will also be passed in the GET-parameter <code>tgWebAppStartParam</code>, so the Web App can load the correct interface right away.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>auth_date</td>
|
||||
<td>Integer</td>
|
||||
<td>Unix time when the form was opened.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hash</td>
|
||||
<td>String</td>
|
||||
<td>A hash of all passed parameters, which the bot server can use to <a href="#validating-data-received-via-the-web-app">check their validity</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="webappuser" href="#webappuser"><i class="anchor-icon"></i></a>WebAppUser</h4>
|
||||
<p>This object contains the data of the Web App user.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>Integer</td>
|
||||
<td>A unique identifier for the user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. It has at most 52 significant bits, so a 64-bit integer or a double-precision float type is safe for storing this identifier.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>is_bot</td>
|
||||
<td>Boolean</td>
|
||||
<td><em>Optional</em>. <em>True</em>, if this user is a bot. Returns in the <a href="#webappinitdata">receiver</a> field only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>first_name</td>
|
||||
<td>String</td>
|
||||
<td>First name of the user or bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>last_name</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Last name of the user or bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Username of the user or bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>language_code</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language. Returns in <em>user</em> field only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>photo_url</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. URL of the user’s profile photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="validating-data-received-via-the-web-app" href="#validating-data-received-via-the-web-app"><i class="anchor-icon"></i></a>Validating data received via the Web App</h4>
|
||||
<p>To validate data received via the Web App, one should send the data from the <em>Telegram.WebApp.initData</em> field to the bot's backend. The data is a query string, which is composed of a series of field-value pairs.</p>
|
||||
<p>You can verify the integrity of the data received by comparing the received <em>hash</em> parameter with the hexadecimal representation of the <a href="https://en.wikipedia.org/wiki/Hash-based_message_authentication_code">HMAC-SHA-256</a> signature of the <strong>data-check-string</strong> with the secret key, which is the <a href="https://en.wikipedia.org/wiki/Hash-based_message_authentication_code">HMAC-SHA-256</a> signature of the <a href="/bots#creating-a-new-bot">bot's token</a> with the constant string <code>WebAppData</code> used as a key.</p>
|
||||
<p><strong>Data-check-string</strong> is a chain of all received fields, sorted alphabetically, in the format <code>key=<value></code> with a <a href="https://en.wikipedia.org/wiki/Newline">line feed</a> character ('\n', 0x0A) used as separator – e.g., <code>'auth_date=<auth_date>\nuser=<user>\nquery_id=<query_id>'</code>.</p>
|
||||
<p>The full check might look like:</p>
|
||||
<pre><code>data_check_string = ...
|
||||
secret_key = HMAC_SHA256(<bot_token>, "WebAppData")
|
||||
if (hex(HMAC_SHA256(data_check_string, secret_key)) == hash) {
|
||||
// data is from Telegram
|
||||
}</code></pre>
|
||||
<p>To prevent the use of outdated data, you can additionally check the <em>auth_date</em> field, which contains a Unix timestamp of when it was received by the Web App.</p>
|
||||
<p>Once validated, the data may be used on your server. Complex data types are represented as JSON-serialized objects.</p>
|
||||
<h4><a class="anchor" name="events-available-for-web-apps" href="#events-available-for-web-apps"><i class="anchor-icon"></i></a>Events Available for Web Apps</h4>
|
||||
<p>The Web App can receive events from the Telegram app, onto which a handler can be attached using the <code>Telegram.WebApp.onEvent(eventType, eventHandler)</code> method. Inside <code>eventHandler</code> the <em>this</em> object refers to <em>Telegram.WebApp</em>, the set of parameters sent to the handler depends on the event type. Below is a list of possible events:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>eventType</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>themeChanged</code></td>
|
||||
<td>Occurs whenever theme settings are changed in the user's Telegram app (including switching to night mode).<br><em>eventHandler</em> receives no parameters, new theme settings and color scheme can be received via <em>this.themeParams</em> and <em>this.colorScheme</em> respectively.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>viewportChanged</code></td>
|
||||
<td>Occurs when the visible section of the Web App is changed.<br><em>eventHandler</em> receives an object with the single field <em>isStateStable</em>. If <code>isStateStable</code> = true, the resizing of the Web App is finished. If it is false, the resizing is ongoing (the user is expanding or collapsing the Web App or an animated object is playing). The current value of the visible section’s height is available in <em>this.viewportHeight</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>mainButtonClicked</code></td>
|
||||
<td>Occurs when the <a href="#mainbutton">main button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" name="adding-bots-to-the-attachment-menu" href="#adding-bots-to-the-attachment-menu"><i class="anchor-icon"></i></a>Adding Bots to the Attachment Menu</h4>
|
||||
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>. Talk to Botfather on the test server to <a href="#using-bots-in-the-test-environment">set up the integration</a>.</p>
|
||||
<p>A special link is used to add bots to the attachment menu:</p>
|
||||
<p><code>https://t.me/botusername?startattach</code><br>or<br><code>https://t.me/botusername?startattach=command</code></p>
|
||||
<blockquote>
|
||||
<p>For example, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in any <strong>private chat</strong>.</p>
|
||||
</blockquote>
|
||||
<p>Opening the link prompts the user to add the bot to their attachment menu. If the bot has already been added, the attachment menu will open in the current chat and redirect to the bot there (if the link is opened from a 1-on-1 chat). If a non-empty <em>startattach</em> parameter was included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<p>The following link formats are also supported:</p>
|
||||
<p><code>https://t.me/username?attach=botusername</code><br><code>https://t.me/username?attach=botusername&startattach=command</code><br><code>https://t.me/+1234567890?attach=botusername</code><br><code>https://t.me/+1234567890?attach=botusername&startattach=command</code></p>
|
||||
<p>These links open the Web App in the attachment menu in the chat with a specific user. If the bot wasn't already added to the attachment menu, the user will be prompted to do so. If a non-empty <em>startattach</em> parameter was included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<h4><a class="anchor" name="using-bots-in-the-test-environment" href="#using-bots-in-the-test-environment"><i class="anchor-icon"></i></a>Using bots in the test environment</h4>
|
||||
<p>To log in to the test environment, use either of the following:</p>
|
||||
<ul>
|
||||
<li><strong>iOS:</strong> tap 10 times on the Settings icon > Accounts > Login to another account > Test.</li>
|
||||
<li><strong>Telegram Desktop:</strong> open ☰ Settings > Shift + Alt + Click ‘Add Account’ and select ‘Test Server’.</li>
|
||||
<li><strong>macOS:</strong> click the Settings icon 10 times to open the Debug Menu, ⌘ + click ‘Add Account’ and log in via phone number.</li>
|
||||
</ul>
|
||||
<p>The test environment is completely separate from the main environment, so you will need to create a <strong>new user account</strong> and a <strong>new bot</strong> with @BotFather.</p>
|
||||
<p>After receiving your bot token, you can send requests to the Bot API in this format: </p>
|
||||
<p><code>https://api.telegram.org/bot<token>/test/METHOD_NAME</code></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_wrap">
|
||||
<div class="footer_columns_wrap footer_desktop">
|
||||
<div class="footer_column footer_column_telegram">
|
||||
<h5>Telegram</h5>
|
||||
<div class="footer_telegram_description"></div>
|
||||
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|
||||
</div>
|
||||
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/faq">FAQ</a></li>
|
||||
<li><a href="//telegram.org/blog">Blog</a></li>
|
||||
<li><a href="//telegram.org/jobs">Jobs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
|
||||
<li><a href="//telegram.org/dl/android">Android</a></li>
|
||||
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
|
||||
<ul>
|
||||
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
|
||||
<li><a href="//macos.telegram.org/">macOS</a></li>
|
||||
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?45"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -366,10 +366,14 @@ userTypeRegular = UserType;
|
|||
//@description A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user
|
||||
userTypeDeleted = UserType;
|
||||
|
||||
//@description A bot (see https://core.telegram.org/bots) @can_join_groups True, if the bot can be invited to basic group and supergroup chats
|
||||
//@description A bot (see https://core.telegram.org/bots)
|
||||
//@can_join_groups True, if the bot can be invited to basic group and supergroup chats
|
||||
//@can_read_all_group_messages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages
|
||||
//@is_inline True, if the bot supports inline queries @inline_query_placeholder Placeholder for inline queries (displayed on the application input field) @need_location True, if the location of the user is expected to be sent with every inline query to this bot
|
||||
userTypeBot can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool = UserType;
|
||||
//@is_inline True, if the bot supports inline queries
|
||||
//@inline_query_placeholder Placeholder for inline queries (displayed on the application input field)
|
||||
//@need_location True, if the location of the user is expected to be sent with every inline query to this bot
|
||||
//@can_be_added_to_attachment_menu True, if the bot can be added to attachment menu
|
||||
userTypeBot can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool can_be_added_to_attachment_menu:Bool = UserType;
|
||||
|
||||
//@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type
|
||||
userTypeUnknown = UserType;
|
||||
|
@ -381,6 +385,9 @@ botCommand command:string description:string = BotCommand;
|
|||
//@description Contains a list of bot commands @bot_user_id Bot's user identifier @commands List of bot commands
|
||||
botCommands bot_user_id:int53 commands:vector<botCommand> = BotCommands;
|
||||
|
||||
//@description Describes a button to be shown instead of bot commands menu button @text Text of the button @url URL to be passed to openWebApp
|
||||
botMenuButton text:string url:string = BotMenuButton;
|
||||
|
||||
|
||||
//@description Represents a location to which a chat is connected @location The location @address Location address; 1-64 characters, as defined by the chat owner
|
||||
chatLocation location:location address:string = ChatLocation;
|
||||
|
@ -419,6 +426,32 @@ inputChatPhotoStatic photo:InputFile = InputChatPhoto;
|
|||
inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputChatPhoto;
|
||||
|
||||
|
||||
//@description Describes actions that a user is allowed to take in a chat
|
||||
//@can_send_messages True, if the user can send text messages, contacts, locations, and venues
|
||||
//@can_send_media_messages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions
|
||||
//@can_send_polls True, if the user can send polls. Implies can_send_messages permissions
|
||||
//@can_send_other_messages True, if the user can send animations, games, stickers, and dice and use inline bots. Implies can_send_messages permissions
|
||||
//@can_add_web_page_previews True, if the user may add a web page preview to their messages. Implies can_send_messages permissions
|
||||
//@can_change_info True, if the user can change the chat title, photo, and other settings
|
||||
//@can_invite_users True, if the user can invite new users to the chat
|
||||
//@can_pin_messages True, if the user can pin messages
|
||||
chatPermissions can_send_messages:Bool can_send_media_messages:Bool can_send_polls:Bool can_send_other_messages:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool = ChatPermissions;
|
||||
|
||||
//@description Describes rights of the administrator
|
||||
//@can_manage_chat True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
||||
//@can_change_info True, if the administrator can change the chat title, photo, and other settings
|
||||
//@can_post_messages True, if the administrator can create channel posts; applicable to channels only
|
||||
//@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
||||
//@can_delete_messages True, if the administrator can delete messages of other users
|
||||
//@can_invite_users True, if the administrator can invite new users to the chat
|
||||
//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members; always true for channels
|
||||
//@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only
|
||||
//@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
|
||||
//@can_manage_video_chats True, if the administrator can manage video chats
|
||||
//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
|
||||
chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_video_chats:Bool is_anonymous:Bool = ChatAdministratorRights;
|
||||
|
||||
|
||||
//@description Represents a user
|
||||
//@id User identifier
|
||||
//@first_name First name of the user
|
||||
|
@ -439,6 +472,15 @@ inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputC
|
|||
//@language_code IETF language tag of the user's language; only available to bots
|
||||
user id:int53 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string = User;
|
||||
|
||||
//@description Contains information about a bot
|
||||
//@share_text The text that is shown on the bot's profile page and is sent together with the link when users share the bot
|
||||
//@param_description The text shown in the chat with the bot if the chat is empty
|
||||
//@menu_button Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown
|
||||
//@commands List of the bot commands
|
||||
//@default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||
botInfo share_text:string description:string menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo;
|
||||
|
||||
//@description Contains full information about a user
|
||||
//@photo User profile photo; may be null
|
||||
//@is_blocked True, if the user is blocked by the current user
|
||||
|
@ -448,11 +490,9 @@ user id:int53 first_name:string last_name:string username:string phone_number:st
|
|||
//@has_private_forwards True, if the user can't be linked in forwarded messages due to their privacy settings
|
||||
//@need_phone_number_privacy_exception True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
|
||||
//@bio A short user bio
|
||||
//@share_text For bots, the text that is shown on the bot's profile page and is sent together with the link when users share the bot
|
||||
//@param_description For bots, the text shown in the chat with the bot if the chat is empty
|
||||
//@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user
|
||||
//@commands For bots, list of the bot commands
|
||||
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool need_phone_number_privacy_exception:Bool bio:string share_text:string description:string group_in_common_count:int32 commands:vector<botCommand> = UserFullInfo;
|
||||
//@bot_info For bots, information about the bot; may be null
|
||||
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool need_phone_number_privacy_exception:Bool bio:string group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
|
||||
|
||||
//@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers
|
||||
users total_count:int32 user_ids:vector<int53> = Users;
|
||||
|
@ -465,18 +505,6 @@ chatAdministrator user_id:int53 custom_title:string is_owner:Bool = ChatAdminist
|
|||
chatAdministrators administrators:vector<chatAdministrator> = ChatAdministrators;
|
||||
|
||||
|
||||
//@description Describes actions that a user is allowed to take in a chat
|
||||
//@can_send_messages True, if the user can send text messages, contacts, locations, and venues
|
||||
//@can_send_media_messages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions
|
||||
//@can_send_polls True, if the user can send polls. Implies can_send_messages permissions
|
||||
//@can_send_other_messages True, if the user can send animations, games, stickers, and dice and use inline bots. Implies can_send_messages permissions
|
||||
//@can_add_web_page_previews True, if the user may add a web page preview to their messages. Implies can_send_messages permissions
|
||||
//@can_change_info True, if the user can change the chat title, photo, and other settings
|
||||
//@can_invite_users True, if the user can invite new users to the chat
|
||||
//@can_pin_messages True, if the user can pin messages
|
||||
chatPermissions can_send_messages:Bool can_send_media_messages:Bool can_send_polls:Bool can_send_other_messages:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool = ChatPermissions;
|
||||
|
||||
|
||||
//@class ChatMemberStatus @description Provides information about the status of a member in a chat
|
||||
|
||||
//@description The user is the owner of the chat and has all the administrator privileges
|
||||
|
@ -488,18 +516,8 @@ chatMemberStatusCreator custom_title:string is_anonymous:Bool is_member:Bool = C
|
|||
//@description The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges
|
||||
//@custom_title A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
|
||||
//@can_be_edited True, if the current user can edit the administrator privileges for the called user
|
||||
//@can_manage_chat True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
||||
//@can_change_info True, if the administrator can change the chat title, photo, and other settings
|
||||
//@can_post_messages True, if the administrator can create channel posts; applicable to channels only
|
||||
//@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
||||
//@can_delete_messages True, if the administrator can delete messages of other users
|
||||
//@can_invite_users True, if the administrator can invite new users to the chat
|
||||
//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members; always true for channels
|
||||
//@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only
|
||||
//@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
|
||||
//@can_manage_video_chats True, if the administrator can manage video chats
|
||||
//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
|
||||
chatMemberStatusAdministrator custom_title:string can_be_edited:Bool can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_video_chats:Bool is_anonymous:Bool = ChatMemberStatus;
|
||||
//@rights Rights of the administrator
|
||||
chatMemberStatusAdministrator custom_title:string can_be_edited:Bool rights:chatAdministratorRights = ChatMemberStatus;
|
||||
|
||||
//@description The user is a member of the chat, without any additional privileges or restrictions
|
||||
chatMemberStatusMember = ChatMemberStatus;
|
||||
|
@ -776,7 +794,7 @@ messageReplyInfo reply_count:int32 recent_replier_ids:vector<MessageSender> last
|
|||
//@reaction Text representation of the reaction
|
||||
//@total_count Number of times the reaction was added
|
||||
//@is_chosen True, if the reaction is chosen by the current user
|
||||
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private chats, basic groups and supergroups
|
||||
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
|
||||
messageReaction reaction:string total_count:int32 is_chosen:Bool recent_sender_ids:vector<MessageSender> = MessageReaction;
|
||||
|
||||
//@description Contains information about interactions with a message
|
||||
|
@ -867,7 +885,7 @@ messageCalendar total_count:int32 days:vector<messageCalendarDay> = MessageCalen
|
|||
//@message_id Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages
|
||||
//@sponsor_chat_id Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link
|
||||
//@sponsor_chat_info Information about the sponsor chat; may be null unless sponsor_chat_id == 0
|
||||
//@link An internal link to be opened when the sponsored message is clicked; may be null. If null, the sponsor chat needs to be opened instead
|
||||
//@link An internal link to be opened when the sponsored message is clicked; may be null if the sponsor chat needs to be opened instead
|
||||
//@content Content of the message. Currently, can be only of the type messageText
|
||||
sponsoredMessage message_id:int53 sponsor_chat_id:int53 sponsor_chat_info:chatInviteLinkInfo link:InternalLinkType content:MessageContent = SponsoredMessage;
|
||||
|
||||
|
@ -898,32 +916,32 @@ foundFileDownloads total_counts:downloadedFileCounts files:vector<fileDownload>
|
|||
//@description Notification settings applied to all private and secret chats when the corresponding chat setting has a default value
|
||||
notificationSettingsScopePrivateChats = NotificationSettingsScope;
|
||||
|
||||
//@description Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value
|
||||
//@description Notification settings applied to all basic group and supergroup chats when the corresponding chat setting has a default value
|
||||
notificationSettingsScopeGroupChats = NotificationSettingsScope;
|
||||
|
||||
//@description Notification settings applied to all channels when the corresponding chat setting has a default value
|
||||
//@description Notification settings applied to all channel chats when the corresponding chat setting has a default value
|
||||
notificationSettingsScopeChannelChats = NotificationSettingsScope;
|
||||
|
||||
|
||||
//@description Contains information about notification settings for a chat
|
||||
//@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat is used instead @mute_for Time left before notifications will be unmuted, in seconds
|
||||
//@use_default_sound If true, sound is ignored and the value for the relevant type of chat is used instead @sound The name of an audio file to be used for notification sounds; only applies to iOS applications
|
||||
//@use_default_sound If true, the value for the relevant type of chat is used instead of sound_id @sound_id Identifier of the notification sound to be played; 0 if sound is disabled
|
||||
//@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of chat is used instead @show_preview True, if message content must be displayed in notifications
|
||||
//@use_default_disable_pinned_message_notifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead @disable_pinned_message_notifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message
|
||||
//@use_default_disable_mention_notifications If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead @disable_mention_notifications If true, notifications for messages with mentions will be created as for an ordinary unread message
|
||||
chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_sound:Bool sound:string use_default_show_preview:Bool show_preview:Bool use_default_disable_pinned_message_notifications:Bool disable_pinned_message_notifications:Bool use_default_disable_mention_notifications:Bool disable_mention_notifications:Bool = ChatNotificationSettings;
|
||||
chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_sound:Bool sound_id:int64 use_default_show_preview:Bool show_preview:Bool use_default_disable_pinned_message_notifications:Bool disable_pinned_message_notifications:Bool use_default_disable_mention_notifications:Bool disable_mention_notifications:Bool = ChatNotificationSettings;
|
||||
|
||||
//@description Contains information about notification settings for several chats
|
||||
//@mute_for Time left before notifications will be unmuted, in seconds
|
||||
//@sound The name of an audio file to be used for notification sounds; only applies to iOS applications
|
||||
//@sound_id Identifier of the notification sound to be played; 0 if sound is disabled
|
||||
//@show_preview True, if message content must be displayed in notifications
|
||||
//@disable_pinned_message_notifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message
|
||||
//@disable_mention_notifications True, if notifications for messages with mentions will be created as for an ordinary unread message
|
||||
scopeNotificationSettings mute_for:int32 sound:string show_preview:Bool disable_pinned_message_notifications:Bool disable_mention_notifications:Bool = ScopeNotificationSettings;
|
||||
scopeNotificationSettings mute_for:int32 sound_id:int64 show_preview:Bool disable_pinned_message_notifications:Bool disable_mention_notifications:Bool = ScopeNotificationSettings;
|
||||
|
||||
|
||||
//@description Contains information about a message draft
|
||||
//@reply_to_message_id Identifier of the message to reply to; 0 if none
|
||||
//@reply_to_message_id Identifier of the replied message; 0 if none
|
||||
//@date Point in time (Unix timestamp) when the draft was created
|
||||
//@input_message_text Content of the message draft; must be of the type inputMessageText
|
||||
draftMessage reply_to_message_id:int53 date:int32 input_message_text:InputMessageContent = DraftMessage;
|
||||
|
@ -1111,6 +1129,9 @@ keyboardButtonTypeRequestLocation = KeyboardButtonType;
|
|||
//@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create
|
||||
keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType;
|
||||
|
||||
//@description A button that opens a web app by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl
|
||||
keyboardButtonTypeWebApp url:string = KeyboardButtonType;
|
||||
|
||||
|
||||
//@description Represents a single button in a bot keyboard @text Text of the button @type Type of the button
|
||||
keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
|
||||
|
@ -1121,9 +1142,12 @@ keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
|
|||
//@description A button that opens a specified URL @url HTTP or tg:// URL to open
|
||||
inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType;
|
||||
|
||||
//@description A button that opens a specified URL and automatically authorize the current user if allowed to do so @url An HTTP URL to open @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages
|
||||
//@description A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo @url An HTTP URL to pass to getLoginUrlInfo @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages
|
||||
inlineKeyboardButtonTypeLoginUrl url:string id:int53 forward_text:string = InlineKeyboardButtonType;
|
||||
|
||||
//@description A button that opens a web app by calling openWebApp @url An HTTP URL to pass to openWebApp
|
||||
inlineKeyboardButtonTypeWebApp url:string = InlineKeyboardButtonType;
|
||||
|
||||
//@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query
|
||||
inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType;
|
||||
|
||||
|
@ -1181,6 +1205,10 @@ loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
|
|||
loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool = LoginUrlInfo;
|
||||
|
||||
|
||||
//@description Contains information about a web app @launch_id Unique identifier for the web app launch @url A web app URL to open in a web view
|
||||
webAppInfo launch_id:int64 url:string = WebAppInfo;
|
||||
|
||||
|
||||
//@description Contains information about a message thread
|
||||
//@chat_id Identifier of the chat to which the message thread belongs
|
||||
//@message_thread_id Message thread identifier, unique within the chat
|
||||
|
@ -1359,7 +1387,7 @@ pageBlockCollage page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBl
|
|||
//@description A slideshow @page_blocks Slideshow item contents @caption Block caption
|
||||
pageBlockSlideshow page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBlock;
|
||||
|
||||
//@description A link to a chat @title Chat title @photo Chat photo; may be null @username Chat username, by which all other information about the chat can be resolved
|
||||
//@description A link to a chat @title Chat title @photo Chat photo; may be null @username Chat username by which all other information about the chat can be resolved
|
||||
pageBlockChatLink title:string photo:chatPhotoInfo username:string = PageBlock;
|
||||
|
||||
//@description A table @caption Table caption @cells Table cells @is_bordered True, if the table is bordered @is_striped True, if the table is striped
|
||||
|
@ -1439,6 +1467,12 @@ bankCardInfo title:string actions:vector<bankCardActionOpenUrl> = BankCardInfo;
|
|||
address country_code:string state:string city:string street_line1:string street_line2:string postal_code:string = Address;
|
||||
|
||||
|
||||
//@description Contains parameters of the app theme @background_color A color of the background in the RGB24 format @text_color A color of text in the RGB24 format
|
||||
//@hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format
|
||||
//@button_text_color A color of text on the buttons in the RGB24 format
|
||||
themeParameters background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters;
|
||||
|
||||
|
||||
//@description Portion of the price of a product (e.g., "delivery cost", "tax amount") @label Label for this portion of the product price @amount Currency amount in the smallest units of the currency
|
||||
labeledPricePart label:string amount:int53 = LabeledPricePart;
|
||||
|
||||
|
@ -1482,11 +1516,6 @@ inputCredentialsGooglePay data:string = InputCredentials;
|
|||
//@description Stripe payment provider @publishable_key Stripe API publishable key @need_country True, if the user country must be provided @need_postal_code True, if the user ZIP/postal code must be provided @need_cardholder_name True, if the cardholder name must be provided
|
||||
paymentsProviderStripe publishable_key:string need_country:Bool need_postal_code:Bool need_cardholder_name:Bool = PaymentsProviderStripe;
|
||||
|
||||
//@description Theme colors for a payment form @background_color A color of the payment form background in the RGB24 format @text_color A color of text in the RGB24 format
|
||||
//@hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format
|
||||
//@button_text_color A color of text on the buttons in the RGB24 format
|
||||
paymentFormTheme background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = PaymentFormTheme;
|
||||
|
||||
//@description Contains information about an invoice payment form
|
||||
//@id The payment form identifier
|
||||
//@invoice Full information of the invoice
|
||||
|
@ -1920,7 +1949,13 @@ messageContactRegistered = MessageContent;
|
|||
//@description The current user has connected a website by logging in using Telegram Login Widget on it @domain_name Domain name of the connected website
|
||||
messageWebsiteConnected domain_name:string = MessageContent;
|
||||
|
||||
//@description Telegram Passport data has been sent @types List of Telegram Passport element types sent
|
||||
//@description Data from a web app has been sent to a bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app
|
||||
messageWebAppDataSent button_text:string = MessageContent;
|
||||
|
||||
//@description Data from a web app has been received; for bots only @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app @data Received data
|
||||
messageWebAppDataReceived button_text:string data:string = MessageContent;
|
||||
|
||||
//@description Telegram Passport data has been sent to a bot @types List of Telegram Passport element types sent
|
||||
messagePassportDataSent types:vector<PassportElementType> = MessageContent;
|
||||
|
||||
//@description Telegram Passport data has been received; for bots only @elements List of received Telegram Passport elements @credentials Encrypted data credentials
|
||||
|
@ -2482,6 +2517,25 @@ diceStickersSlotMachine background:sticker lever:sticker left_reel:sticker cente
|
|||
importedContacts user_ids:vector<int53> importer_count:vector<int32> = ImportedContacts;
|
||||
|
||||
|
||||
//@description Describes a color to highlight a bot added to attachment menu @light_color Color in the RGB24 format for light themes @dark_color Color in the RGB24 format for dark themes
|
||||
attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotColor;
|
||||
|
||||
//@description Represents a bot added to attachment menu
|
||||
//@bot_user_id User identifier of the bot added to attachment menu
|
||||
//@name Name for the bot in attachment menu
|
||||
//@name_color Color to highlight selected name of the bot if appropriate; may be null
|
||||
//@default_icon Default attachment menu icon for the bot in SVG format; may be null
|
||||
//@ios_static_icon Attachment menu icon for the bot in SVG format for the official iOS app; may be null
|
||||
//@ios_animated_icon Attachment menu icon for the bot in TGS format for the official iOS app; may be null
|
||||
//@android_icon Attachment menu icon for the bot in TGS format for the official Android app; may be null
|
||||
//@macos_icon Attachment menu icon for the bot in TGS format for the official native macOS app; may be null
|
||||
//@icon_color Color to highlight selected icon of the bot if appropriate; may be null
|
||||
attachmentMenuBot bot_user_id:int53 name:string name_color:attachmentMenuBotColor default_icon:file ios_static_icon:file ios_animated_icon:file android_icon:file macos_icon:file icon_color:attachmentMenuBotColor = AttachmentMenuBot;
|
||||
|
||||
//@description Information about the message sent by answerWebAppQuery @inline_message_id Identifier of the sent inline message, if known
|
||||
sentWebAppMessage inline_message_id:string = SentWebAppMessage;
|
||||
|
||||
|
||||
//@description Contains an HTTP URL @url The URL
|
||||
httpUrl url:string = HttpUrl;
|
||||
|
||||
|
@ -3105,9 +3159,22 @@ notificationGroupTypeSecretChat = NotificationGroupType;
|
|||
notificationGroupTypeCalls = NotificationGroupType;
|
||||
|
||||
|
||||
//@description Describes a notification sound in MP3 format
|
||||
//@id Unique identifier of the notification sound
|
||||
//@duration Duration of the sound, in seconds
|
||||
//@date Point in time (Unix timestamp) when the sound was created
|
||||
//@title Title of the notification sound
|
||||
//@data Arbitrary data, defined while the sound was uploaded
|
||||
//@sound File containing the sound
|
||||
notificationSound id:int64 duration:int32 date:int32 title:string data:string sound:file = NotificationSound;
|
||||
|
||||
//@description Contains a list of notification sounds @notification_sounds A list of notification sounds
|
||||
notificationSounds notification_sounds:vector<notificationSound> = NotificationSounds;
|
||||
|
||||
|
||||
//@description Contains information about a notification @id Unique persistent identifier of this notification @date Notification date
|
||||
//@is_silent True, if the notification was initially silent @type Notification type
|
||||
notification id:int32 date:int32 is_silent:Bool type:NotificationType = Notification;
|
||||
//@sound_id Identifier of the notification sound to be played; 0 if sound is disabled @type Notification type
|
||||
notification id:int32 date:int32 sound_id:int64 type:NotificationType = Notification;
|
||||
|
||||
//@description Describes a group of notifications @id Unique persistent auto-incremented from 1 identifier of the notification group @type Type of the group
|
||||
//@chat_id Identifier of a chat to which all notifications in the group belong
|
||||
|
@ -3240,7 +3307,7 @@ sessions sessions:vector<session> inactive_session_ttl_days:int32 = Sessions;
|
|||
//@log_in_date Point in time (Unix timestamp) when the user was logged in
|
||||
//@last_active_date Point in time (Unix timestamp) when obtained authorization was last used
|
||||
//@ip IP address from which the user was logged in, in human-readable format
|
||||
//@location Human-readable description of a country and a region, from which the user was logged in, based on the IP address
|
||||
//@location Human-readable description of a country and a region from which the user was logged in, based on the IP address
|
||||
connectedWebsite id:int64 domain_name:string bot_user_id:int53 browser:string platform:string log_in_date:int32 last_active_date:int32 ip:string location:string = ConnectedWebsite;
|
||||
|
||||
//@description Contains a list of websites the current user is logged in with Telegram @websites List of connected websites
|
||||
|
@ -3285,6 +3352,13 @@ chatReportReasonCustom = ChatReportReason;
|
|||
//@description The link is a link to the active sessions section of the app. Use getActiveSessions to handle the link
|
||||
internalLinkTypeActiveSessions = InternalLinkType;
|
||||
|
||||
//@description The link is a link to an attachment menu bot to be opened in the specified chat. Process given chat_link to open corresponding 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 user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it.
|
||||
//-If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL
|
||||
//@chat_link An internal link pointing to a chat; may be null if the current chat needs to be kept @bot_username Username of the bot @url URL to be passed to openWebApp
|
||||
internalLinkTypeAttachmentMenuBot chat_link:InternalLinkType bot_username:string url:string = InternalLinkType;
|
||||
|
||||
//@description The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode @code The authentication code
|
||||
internalLinkTypeAuthenticationCode code:string = InternalLinkType;
|
||||
|
||||
|
@ -3297,9 +3371,19 @@ internalLinkTypeBackground background_name:string = InternalLinkType;
|
|||
internalLinkTypeBotStart bot_username:string start_parameter:string = InternalLinkType;
|
||||
|
||||
//@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 group to add the bot to, and then call sendBotStartMessage with the given start parameter and the chosen group chat. Bots can be added to a public group only by administrators of the group
|
||||
//@bot_username Username of the bot @start_parameter The parameter to be passed to sendBotStartMessage
|
||||
internalLinkTypeBotStartInGroup bot_username:string start_parameter:string = InternalLinkType;
|
||||
//-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.
|
||||
//@bot_username Username of the bot @start_parameter The parameter to be passed to sendBotStartMessage @administrator_rights Expected administrator rights for the bot; may be null
|
||||
internalLinkTypeBotStartInGroup bot_username:string start_parameter:string administrator_rights:chatAdministratorRights = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a Telegram bot, which is supposed 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
|
||||
//@bot_username Username of the bot @administrator_rights Expected administrator rights for the bot
|
||||
internalLinkTypeBotAddToChannel bot_username:string administrator_rights:chatAdministratorRights = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the change phone number section of the app
|
||||
internalLinkTypeChangePhoneNumber = InternalLinkType;
|
||||
|
@ -3408,6 +3492,9 @@ fileTypeAudio = FileType;
|
|||
//@description The file is a document
|
||||
fileTypeDocument = FileType;
|
||||
|
||||
//@description The file is a notification sound
|
||||
fileTypeNotificationSound = FileType;
|
||||
|
||||
//@description The file is a photo
|
||||
fileTypePhoto = FileType;
|
||||
|
||||
|
@ -3915,10 +4002,10 @@ updateNotification notification_group_id:int32 notification:notification = Updat
|
|||
//@type New type of the notification group
|
||||
//@chat_id Identifier of a chat to which all notifications in the group belong
|
||||
//@notification_settings_chat_id Chat identifier, which notification settings must be applied to the added notifications
|
||||
//@is_silent True, if the notifications must be shown without sound
|
||||
//@notification_sound_id Identifier of the notification sound to be played; 0 if sound is disabled
|
||||
//@total_count Total number of unread notifications in the group, can be bigger than number of active notifications
|
||||
//@added_notifications List of added group notifications, sorted by notification ID @removed_notification_ids Identifiers of removed group notifications, sorted by notification ID
|
||||
updateNotificationGroup notification_group_id:int32 type:NotificationGroupType chat_id:int53 notification_settings_chat_id:int53 is_silent:Bool total_count:int32 added_notifications:vector<notification> removed_notification_ids:vector<int32> = Update;
|
||||
updateNotificationGroup notification_group_id:int32 type:NotificationGroupType chat_id:int53 notification_settings_chat_id:int53 notification_sound_id:int64 total_count:int32 added_notifications:vector<notification> removed_notification_ids:vector<int32> = Update;
|
||||
|
||||
//@description Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update @groups Lists of active notification groups
|
||||
updateActiveNotifications groups:vector<notificationGroup> = Update;
|
||||
|
@ -4044,6 +4131,9 @@ updateFavoriteStickers sticker_ids:vector<int32> = Update;
|
|||
//@description The list of saved animations was updated @animation_ids The new list of file identifiers of saved animations
|
||||
updateSavedAnimations animation_ids:vector<int32> = Update;
|
||||
|
||||
//@description The list of saved notifications sounds was updated. This update may not be sent until information about a notification sound was requested for the first time @notification_sound_ids The new list of identifiers of saved notification sounds
|
||||
updateSavedNotificationSounds notification_sound_ids:vector<int64> = Update;
|
||||
|
||||
//@description The selected background has changed @for_dark_theme True, if background for dark theme has changed @background The new selected background; may be null
|
||||
updateSelectedBackground for_dark_theme:Bool background:background = Update;
|
||||
|
||||
|
@ -4062,6 +4152,12 @@ updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService
|
|||
//@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby
|
||||
updateUsersNearby users_nearby:vector<chatNearby> = Update;
|
||||
|
||||
//@description The list of bots added to attachment menu has changed @bots The new list of bots added to attachment menu. The bots must be shown in attachment menu only in private chats. The bots must not be shown on scheduled messages screen
|
||||
updateAttachmentMenuBots bots:vector<attachmentMenuBot> = Update;
|
||||
|
||||
//@description A message was sent by an opened web app, so the web app needs to be closed @web_app_launch_id Identifier of web app launch
|
||||
updateWebAppMessageSent web_app_launch_id:int64 = Update;
|
||||
|
||||
//@description The list of supported reactions has changed @reactions The new list of supported reactions
|
||||
updateReactions reactions:vector<reaction> = Update;
|
||||
|
||||
|
@ -4079,7 +4175,7 @@ updateAnimationSearchParameters provider:string emojis:vector<string> = Update;
|
|||
updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vector<SuggestedAction> = Update;
|
||||
|
||||
//@description A new incoming inline query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
|
||||
//@chat_type The type of the chat, from which the query originated; may be null if unknown @query Text of the query @offset Offset of the first entry to return
|
||||
//@chat_type The type of the chat from which the query originated; may be null if unknown @query Text of the query @offset Offset of the first entry to return
|
||||
updateNewInlineQuery id:int64 sender_user_id:int53 user_location:location chat_type:ChatType query:string offset:string = Update;
|
||||
|
||||
//@description The user has chosen a result of an inline query; for bots only @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
|
||||
|
@ -4087,11 +4183,11 @@ updateNewInlineQuery id:int64 sender_user_id:int53 user_location:location chat_t
|
|||
updateNewChosenInlineResult sender_user_id:int53 user_location:location query:string result_id:string inline_message_id:string = Update;
|
||||
|
||||
//@description A new incoming callback query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query
|
||||
//@chat_id Identifier of the chat where the query was sent @message_id Identifier of the message, from which the query originated
|
||||
//@chat_id Identifier of the chat where the query was sent @message_id Identifier of the message from which the query originated
|
||||
//@chat_instance Identifier that uniquely corresponds to the chat to which the message was sent @payload Query payload
|
||||
updateNewCallbackQuery id:int64 sender_user_id:int53 chat_id:int53 message_id:int53 chat_instance:int64 payload:CallbackQueryPayload = Update;
|
||||
|
||||
//@description A new incoming callback query from a message sent via a bot; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message, from which the query originated
|
||||
//@description A new incoming callback query from a message sent via a bot; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message from which the query originated
|
||||
//@chat_instance An identifier uniquely corresponding to the chat a message was sent to @payload Query payload
|
||||
updateNewInlineCallbackQuery id:int64 sender_user_id:int53 inline_message_id:string chat_instance:int64 payload:CallbackQueryPayload = Update;
|
||||
|
||||
|
@ -4422,7 +4518,7 @@ getMessageThreadHistory chat_id:int53 message_id:int53 from_message_id:int53 off
|
|||
//@chat_id Chat identifier @remove_from_chat_list Pass true to remove the chat from all chat lists @revoke Pass true to delete chat history for all users
|
||||
deleteChatHistory chat_id:int53 remove_from_chat_list:Bool revoke:Bool = Ok;
|
||||
|
||||
//@description Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method @chat_id Chat identifier
|
||||
//@description Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the username and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat @chat_id Chat identifier
|
||||
deleteChat chat_id:int53 = Ok;
|
||||
|
||||
//@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
|
||||
|
@ -4553,7 +4649,7 @@ setChatMessageSender chat_id:int53 message_sender_id:MessageSender = Ok;
|
|||
//@description Sends a message. Returns the sent message
|
||||
//@chat_id Target chat
|
||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
||||
//@reply_to_message_id Identifier of the message to reply to or 0
|
||||
//@reply_to_message_id Identifier of the replied message; 0 if none
|
||||
//@options Options to be used to send the message; pass null to use default options
|
||||
//@reply_markup Markup for replying to the message; pass null if none; for bots only
|
||||
//@input_message_content The content of the message to be sent
|
||||
|
@ -4562,7 +4658,7 @@ sendMessage chat_id:int53 message_thread_id:int53 reply_to_message_id:int53 opti
|
|||
//@description Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
||||
//@chat_id Target chat
|
||||
//@message_thread_id If not 0, a message thread identifier in which the messages will be sent
|
||||
//@reply_to_message_id Identifier of a message to reply to or 0
|
||||
//@reply_to_message_id Identifier of a replied message; 0 if none
|
||||
//@options Options to be used to send the messages; pass null to use default options
|
||||
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album
|
||||
//@only_preview Pass true to get fake messages instead of actually sending them
|
||||
|
@ -4575,7 +4671,7 @@ sendBotStartMessage bot_user_id:int53 chat_id:int53 parameter:string = Message;
|
|||
//@description Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message
|
||||
//@chat_id Target chat
|
||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
||||
//@reply_to_message_id Identifier of a message to reply to or 0
|
||||
//@reply_to_message_id Identifier of a replied message; 0 if none
|
||||
//@options Options to be used to send the message; pass null to use default options
|
||||
//@query_id Identifier of the inline query
|
||||
//@result_id Identifier of the inline result
|
||||
|
@ -4603,7 +4699,7 @@ sendChatScreenshotTakenNotification chat_id:int53 = Ok;
|
|||
//@description Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message
|
||||
//@chat_id Target chat
|
||||
//@sender_id Identifier of the sender of the message
|
||||
//@reply_to_message_id Identifier of the message to reply to or 0
|
||||
//@reply_to_message_id Identifier of the replied message; 0 if none
|
||||
//@disable_notification Pass true to disable notification for the message
|
||||
//@input_message_content The content of the message to be added
|
||||
addLocalMessage chat_id:int53 sender_id:MessageSender reply_to_message_id:int53 disable_notification:Bool input_message_content:InputMessageContent = Message;
|
||||
|
@ -4747,6 +4843,9 @@ getJsonValue json:string = JsonValue;
|
|||
//@description Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously @json_value The JsonValue object
|
||||
getJsonString json_value:JsonValue = Text;
|
||||
|
||||
//@description Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously @theme Theme parameters to convert to JSON
|
||||
getThemeParametersJsonString theme:themeParameters = Text;
|
||||
|
||||
|
||||
//@description Changes the user answer to a poll. A poll in quiz mode can be answered only once
|
||||
//@chat_id Identifier of the chat to which the poll belongs
|
||||
|
@ -4803,6 +4902,34 @@ getInlineQueryResults bot_user_id:int53 chat_id:int53 user_location:location que
|
|||
answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector<InputInlineQueryResult> cache_time:int32 next_offset:string switch_pm_text:string switch_pm_parameter:string = Ok;
|
||||
|
||||
|
||||
//@description Returns an HTTPS URL of a web app to open after keyboardButtonTypeWebApp button is pressed
|
||||
//@bot_user_id Identifier of the target bot
|
||||
//@url The URL from the keyboardButtonTypeWebApp button
|
||||
//@theme Preferred web app theme; pass null to use the default theme
|
||||
getWebAppUrl bot_user_id:int53 url:string theme:themeParameters = HttpUrl;
|
||||
|
||||
//@description Sends data received from a keyboardButtonTypeWebApp web app to a bot
|
||||
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app @data Received data
|
||||
sendWebAppData bot_user_id:int53 button_text:string data:string = Ok;
|
||||
|
||||
//@description Informs TDLib that a web app is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
|
||||
//-For each bot, a confirmation alert about data sent to the bot must be shown once
|
||||
//@chat_id Identifier of the chat in which the web app is opened. Web apps can be opened only in private chats for now
|
||||
//@bot_user_id Identifier of the bot, providing the web app
|
||||
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||
//@theme Preferred web app theme; pass null to use the default theme
|
||||
//@reply_to_message_id Identifier of the replied message for the message sent by the web app; 0 if none
|
||||
openWebApp chat_id:int53 bot_user_id:int53 url:string theme:themeParameters reply_to_message_id:int53 = WebAppInfo;
|
||||
|
||||
//@description Informs TDLib that a previously opened web app was closed @web_app_launch_id Identifier of web app launch, received from openWebApp
|
||||
closeWebApp web_app_launch_id:int64 = Ok;
|
||||
|
||||
//@description Sets the result of interaction with a web app and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
|
||||
//@web_app_query_id Identifier of the web app query
|
||||
//@result The result of the query
|
||||
answerWebAppQuery web_app_query_id:string result:InputInlineQueryResult = SentWebAppMessage;
|
||||
|
||||
|
||||
//@description Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @chat_id Identifier of the chat with the message @message_id Identifier of the message from which the query originated @payload Query payload
|
||||
getCallbackQueryAnswer chat_id:int53 message_id:int53 payload:CallbackQueryPayload = CallbackQueryAnswer;
|
||||
|
||||
|
@ -4948,8 +5075,8 @@ setChatTitle chat_id:int53 title:string = Ok;
|
|||
setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok;
|
||||
|
||||
//@description Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels
|
||||
//-Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram)
|
||||
//@chat_id Chat identifier @ttl New TTL value, in seconds; must be one of 0, 86400, 7 * 86400, or 31 * 86400 unless the chat is secret
|
||||
//-Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
|
||||
//@chat_id Chat identifier @ttl New TTL value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400
|
||||
setChatMessageTtl chat_id:int53 ttl:int32 = Ok;
|
||||
|
||||
//@description Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right
|
||||
|
@ -5059,6 +5186,19 @@ getChatAdministrators chat_id:int53 = ChatAdministrators;
|
|||
clearAllDraftMessages exclude_secret_chats:Bool = Ok;
|
||||
|
||||
|
||||
//@description Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier @notification_sound_id Identifier of the notification sound
|
||||
getSavedNotificationSound notification_sound_id:int64 = NotificationSounds;
|
||||
|
||||
//@description Returns list of saved notification sounds. If a sound isn't in the list, then default sound needs to be used
|
||||
getSavedNotificationSounds = NotificationSounds;
|
||||
|
||||
//@description Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, it is position isn't changed @sound Notification sound file to add
|
||||
addSavedNotificationSound sound:InputFile = NotificationSound;
|
||||
|
||||
//@description Removes a notification sound from the list of saved notification sounds @notification_sound_id Identifier of the notification sound
|
||||
removeSavedNotificationSound notification_sound_id:int64 = Ok;
|
||||
|
||||
|
||||
//@description Returns list of chats with non-default notification settings
|
||||
//@scope If specified, only chats from the scope will be returned; pass null to return chats from all scopes
|
||||
//@compare_sound Pass true to include in the response chats with only non-default sound
|
||||
|
@ -5070,7 +5210,7 @@ getScopeNotificationSettings scope:NotificationSettingsScope = ScopeNotification
|
|||
//@description Changes notification settings for chats of a given type @scope Types of chats for which to change the notification settings @notification_settings The new notification settings for the given scope
|
||||
setScopeNotificationSettings scope:NotificationSettingsScope notification_settings:scopeNotificationSettings = Ok;
|
||||
|
||||
//@description Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown
|
||||
//@description Resets all notification settings to their default values. By default, all chats are unmuted and message previews are shown
|
||||
resetAllNotificationSettings = Ok;
|
||||
|
||||
|
||||
|
@ -5082,6 +5222,13 @@ toggleChatIsPinned chat_list:ChatList chat_id:int53 is_pinned:Bool = Ok;
|
|||
setPinnedChats chat_list:ChatList chat_ids:vector<int53> = Ok;
|
||||
|
||||
|
||||
//@description Returns information about a bot that can be added to attachment menu @bot_user_id Bot's user identifier
|
||||
getAttachmentMenuBot bot_user_id:int53 = AttachmentMenuBot;
|
||||
|
||||
//@description Adds or removes a bot to attachment menu. Bot can be added to attachment menu, only if userTypeBot.can_be_added_to_attachment_menu == true @bot_user_id Bot's user identifier @is_added Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu
|
||||
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool = Ok;
|
||||
|
||||
|
||||
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
|
||||
//@file_id Identifier of the file to download
|
||||
//@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
|
||||
|
@ -5285,7 +5432,7 @@ getVideoChatAvailableParticipants chat_id:int53 = MessageSenders;
|
|||
setVideoChatDefaultParticipant chat_id:int53 default_participant_id:MessageSender = Ok;
|
||||
|
||||
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights
|
||||
//@chat_id Chat identifier, in which the video chat will be created
|
||||
//@chat_id Identifier of a chat in which the video chat will be created
|
||||
//@title Group call title; if empty, chat title will be used
|
||||
//@start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
||||
//@is_rtmp_stream Pass true to create an RTMP stream instead of an ordinary video chat; requires creator privileges
|
||||
|
@ -5604,6 +5751,20 @@ deleteCommands scope:BotCommandScope language_code:string = Ok;
|
|||
//@language_code A two-letter ISO 639-1 language code or an empty string
|
||||
getCommands scope:BotCommandScope language_code:string = BotCommands;
|
||||
|
||||
//@description Sets menu button for the given user or for all users; for bots only
|
||||
//@user_id Identifier of the user or 0 to set menu button for all users
|
||||
//@menu_button New menu button
|
||||
setMenuButton user_id:int53 menu_button:botMenuButton = Ok;
|
||||
|
||||
//@description Returns menu button set by the bot for the given user; for bots only @user_id Identifier of the user or 0 to get the default menu button
|
||||
getMenuButton user_id:int53 = BotMenuButton;
|
||||
|
||||
//@description Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only @default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||
setDefaultGroupAdministratorRights default_group_administrator_rights:chatAdministratorRights = Ok;
|
||||
|
||||
//@description Sets default administrator rights for adding the bot to channel chats; for bots only @default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||
setDefaultChannelAdministratorRights default_channel_administrator_rights:chatAdministratorRights = Ok;
|
||||
|
||||
|
||||
//@description Returns all active sessions of the current user
|
||||
getActiveSessions = Sessions;
|
||||
|
@ -5671,7 +5832,7 @@ getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filte
|
|||
//@chat_id Chat identifier of the Invoice message
|
||||
//@message_id Message identifier
|
||||
//@theme Preferred payment form theme; pass null to use the default theme
|
||||
getPaymentForm chat_id:int53 message_id:int53 theme:paymentFormTheme = PaymentForm;
|
||||
getPaymentForm chat_id:int53 message_id:int53 theme:themeParameters = PaymentForm;
|
||||
|
||||
//@description Validates the order information provided by a user and returns the available shipping options for a flexible invoice
|
||||
//@chat_id Chat identifier of the Invoice message
|
||||
|
@ -5960,7 +6121,7 @@ setStickerPositionInSet sticker:InputFile position:int32 = Ok;
|
|||
removeStickerFromSet sticker:InputFile = Ok;
|
||||
|
||||
|
||||
//@description Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded @location Location of the map center @zoom Map zoom level; 13-20 @width Map width in pixels before applying scale; 16-1024 @height Map height in pixels before applying scale; 16-1024 @scale Map scale; 1-3 @chat_id Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown
|
||||
//@description Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded @location Location of the map center @zoom Map zoom level; 13-20 @width Map width in pixels before applying scale; 16-1024 @height Map height in pixels before applying scale; 16-1024 @scale Map scale; 1-3 @chat_id Identifier of a chat in which the thumbnail will be shown. Use 0 if unknown
|
||||
getMapThumbnailFile location:location zoom:int32 width:int32 height:int32 scale:int32 chat_id:int53 = File;
|
||||
|
||||
|
||||
|
@ -6078,7 +6239,7 @@ testSquareInt x:int32 = TestInt;
|
|||
//@description Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization
|
||||
testNetwork = Ok;
|
||||
//@description Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization @server Proxy server IP address @port Proxy server port @type Proxy type
|
||||
//@dc_id Identifier of a datacenter, with which to test connection @timeout The maximum overall timeout for the request
|
||||
//@dc_id Identifier of a datacenter with which to test connection @timeout The maximum overall timeout for the request
|
||||
testProxy server:string port:int32 type:ProxyType dc_id:int32 timeout:double = Ok;
|
||||
//@description Forces an updates.getDifference call to the Telegram servers; for testing only
|
||||
testGetDifference = Ok;
|
||||
|
|
|
@ -100,7 +100,7 @@ storage.fileMp4#b3cea0e4 = storage.FileType;
|
|||
storage.fileWebp#1081464c = storage.FileType;
|
||||
|
||||
userEmpty#d3bc4b7a id:long = User;
|
||||
user#3ff6ecb0 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
|
||||
user#3ff6ecb0 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
|
||||
|
||||
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
|
||||
userProfilePhoto#82d1f706 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
|
||||
|
@ -113,13 +113,13 @@ userStatusLastWeek#7bf09fc = UserStatus;
|
|||
userStatusLastMonth#77ebc742 = UserStatus;
|
||||
|
||||
chatEmpty#29562865 id:long = Chat;
|
||||
chat#41cbf256 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true noforwards:flags.25?true id:long title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
|
||||
chat#41cbf256 flags:# creator:flags.0?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true noforwards:flags.25?true id:long title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
|
||||
chatForbidden#6592a1a7 id:long title:string = Chat;
|
||||
channel#8261ac61 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
|
||||
channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
|
||||
|
||||
chatFull#d18ee226 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?Vector<string> = ChatFull;
|
||||
channelFull#e13c3d20 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?Vector<string> = ChatFull;
|
||||
channelFull#ea68a619 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?Vector<string> = ChatFull;
|
||||
|
||||
chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
|
||||
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
|
||||
|
@ -179,6 +179,8 @@ messageActionSetMessagesTTL#aa1afbfd period:int = MessageAction;
|
|||
messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction;
|
||||
messageActionSetChatTheme#aa786345 emoticon:string = MessageAction;
|
||||
messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
|
||||
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
|
||||
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
|
||||
|
||||
dialog#a8edd0f5 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int = Dialog;
|
||||
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
|
||||
|
@ -208,9 +210,9 @@ inputNotifyUsers#193b4417 = InputNotifyPeer;
|
|||
inputNotifyChats#4a95e84e = InputNotifyPeer;
|
||||
inputNotifyBroadcasts#b1db7c7e = InputNotifyPeer;
|
||||
|
||||
inputPeerNotifySettings#9c3d198e flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?string = InputPeerNotifySettings;
|
||||
inputPeerNotifySettings#df1f002b flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?NotificationSound = InputPeerNotifySettings;
|
||||
|
||||
peerNotifySettings#af509d20 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?string = PeerNotifySettings;
|
||||
peerNotifySettings#a83b0426 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int ios_sound:flags.3?NotificationSound android_sound:flags.4?NotificationSound other_sound:flags.5?NotificationSound = PeerNotifySettings;
|
||||
|
||||
peerSettings#a518110d flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true request_chat_broadcast:flags.10?true geo_distance:flags.6?int request_chat_title:flags.9?string request_chat_date:flags.9?int = PeerSettings;
|
||||
|
||||
|
@ -228,7 +230,7 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
|
|||
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
|
||||
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
|
||||
|
||||
userFull#cf366521 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true id:long about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string = UserFull;
|
||||
userFull#8c72ea81 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true id:long about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights = UserFull;
|
||||
|
||||
contact#145ade0b user_id:long mutual:Bool = Contact;
|
||||
|
||||
|
@ -374,6 +376,10 @@ updateBotCommands#4d712f2e peer:Peer bot_id:long commands:Vector<BotCommand> = U
|
|||
updatePendingJoinRequests#7063c3db peer:Peer requests_pending:int recent_requesters:Vector<long> = Update;
|
||||
updateBotChatInviteRequester#11dfa986 peer:Peer date:int user_id:long about:string invite:ExportedChatInvite qts:int = Update;
|
||||
updateMessageReactions#154798c3 peer:Peer msg_id:int reactions:MessageReactions = Update;
|
||||
updateAttachMenuBots#17b7a20b = Update;
|
||||
updateWebViewResultSent#1592b79d query_id:long = Update;
|
||||
updateBotMenuButton#14b85813 bot_id:long button:BotMenuButton = Update;
|
||||
updateSavedRingtones#74d8be99 = Update;
|
||||
|
||||
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
|
||||
|
||||
|
@ -565,7 +571,7 @@ messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
|
|||
|
||||
botCommand#c27ac8c7 command:string description:string = BotCommand;
|
||||
|
||||
botInfo#1b74b335 user_id:long description:string commands:Vector<BotCommand> = BotInfo;
|
||||
botInfo#e4169b5d user_id:long description:string commands:Vector<BotCommand> menu_button:BotMenuButton = BotInfo;
|
||||
|
||||
keyboardButton#a2fa4880 text:string = KeyboardButton;
|
||||
keyboardButtonUrl#258aff05 text:string url:string = KeyboardButton;
|
||||
|
@ -580,6 +586,8 @@ inputKeyboardButtonUrlAuth#d02e7fd4 flags:# request_write_access:flags.0?true te
|
|||
keyboardButtonRequestPoll#bbc7515d flags:# quiz:flags.0?Bool text:string = KeyboardButton;
|
||||
inputKeyboardButtonUserProfile#e988037b text:string user_id:InputUser = KeyboardButton;
|
||||
keyboardButtonUserProfile#308660c1 text:string user_id:long = KeyboardButton;
|
||||
keyboardButtonWebView#13767230 text:string url:string = KeyboardButton;
|
||||
keyboardButtonSimpleWebView#a0c0505c text:string url:string = KeyboardButton;
|
||||
|
||||
keyboardButtonRow#77608b83 buttons:Vector<KeyboardButton> = KeyboardButtonRow;
|
||||
|
||||
|
@ -1319,6 +1327,38 @@ phone.groupCallStreamChannels#d0e482b2 channels:Vector<GroupCallStreamChannel> =
|
|||
|
||||
phone.groupCallStreamRtmpUrl#2dbf3432 url:string key:string = phone.GroupCallStreamRtmpUrl;
|
||||
|
||||
attachMenuBotIconColor#4576f3f0 name:string color:int = AttachMenuBotIconColor;
|
||||
|
||||
attachMenuBotIcon#b2a7386b flags:# name:string icon:Document colors:flags.0?Vector<AttachMenuBotIconColor> = AttachMenuBotIcon;
|
||||
|
||||
attachMenuBot#e93cb772 flags:# inactive:flags.0?true bot_id:long short_name:string icons:Vector<AttachMenuBotIcon> = AttachMenuBot;
|
||||
|
||||
attachMenuBotsNotModified#f1d88a5c = AttachMenuBots;
|
||||
attachMenuBots#3c4301c0 hash:long bots:Vector<AttachMenuBot> users:Vector<User> = AttachMenuBots;
|
||||
|
||||
attachMenuBotsBot#93bf667f bot:AttachMenuBot users:Vector<User> = AttachMenuBotsBot;
|
||||
|
||||
webViewResultUrl#c14557c query_id:long url:string = WebViewResult;
|
||||
|
||||
simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResult;
|
||||
|
||||
webViewMessageSent#c94511c flags:# msg_id:flags.0?InputBotInlineMessageID = WebViewMessageSent;
|
||||
|
||||
botMenuButtonDefault#7533a588 = BotMenuButton;
|
||||
botMenuButtonCommands#4258c205 = BotMenuButton;
|
||||
botMenuButton#c7b57ce6 text:string url:string = BotMenuButton;
|
||||
|
||||
account.savedRingtonesNotModified#fbf6e8b1 = account.SavedRingtones;
|
||||
account.savedRingtones#c1e92cc5 hash:long ringtones:Vector<Document> = account.SavedRingtones;
|
||||
|
||||
notificationSoundDefault#97e8bebe = NotificationSound;
|
||||
notificationSoundNone#6f0c34df = NotificationSound;
|
||||
notificationSoundLocal#830b9ae4 title:string data:string = NotificationSound;
|
||||
notificationSoundRingtone#ff6c8049 id:long = NotificationSound;
|
||||
|
||||
account.savedRingtone#b7263f6d = account.SavedRingtone;
|
||||
account.savedRingtoneConverted#1f307eb7 document:Document = account.SavedRingtone;
|
||||
|
||||
---functions---
|
||||
|
||||
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
||||
|
@ -1422,6 +1462,9 @@ account.declinePasswordReset#4c9409f6 = Bool;
|
|||
account.getChatThemes#d638de89 hash:long = account.Themes;
|
||||
account.setAuthorizationTTL#bf899aa0 authorization_ttl_days:int = Bool;
|
||||
account.changeAuthorizationSettings#40f48462 flags:# hash:long encrypted_requests_disabled:flags.0?Bool call_requests_disabled:flags.1?Bool = Bool;
|
||||
account.getSavedRingtones#e1902288 hash:long = account.SavedRingtones;
|
||||
account.saveRingtone#3dea5b03 id:InputDocument unsave:Bool = account.SavedRingtone;
|
||||
account.uploadRingtone#831a83a2 file:InputFile file_name:string mime_type:string = Document;
|
||||
|
||||
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
|
||||
users.getFullUser#b60f5918 id:InputUser = users.UserFull;
|
||||
|
@ -1608,6 +1651,14 @@ messages.translateText#24ce6dee flags:# peer:flags.0?InputPeer msg_id:flags.0?in
|
|||
messages.getUnreadReactions#e85bae1a peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
|
||||
messages.readReactions#82e251d7 peer:InputPeer = messages.AffectedHistory;
|
||||
messages.searchSentMedia#107e31a0 q:string filter:MessagesFilter limit:int = messages.Messages;
|
||||
messages.getAttachMenuBots#16fcc2cb hash:long = AttachMenuBots;
|
||||
messages.getAttachMenuBot#77216192 bot:InputUser = AttachMenuBotsBot;
|
||||
messages.toggleBotInAttachMenu#1aee33af bot:InputUser enabled:Bool = Bool;
|
||||
messages.requestWebView#fa04dff flags:# from_bot_menu:flags.4?true silent:flags.5?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON reply_to_msg_id:flags.0?int = WebViewResult;
|
||||
messages.prolongWebView#d22ad148 flags:# silent:flags.5?true peer:InputPeer bot:InputUser query_id:long reply_to_msg_id:flags.0?int = Bool;
|
||||
messages.requestSimpleWebView#6abb2f73 flags:# bot:InputUser url:string theme_params:flags.0?DataJSON = SimpleWebViewResult;
|
||||
messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInlineResult = WebViewMessageSent;
|
||||
messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
|
||||
|
||||
updates.getState#edd4882a = updates.State;
|
||||
updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
|
||||
|
@ -1675,7 +1726,7 @@ channels.editBanned#96e6cd81 channel:InputChannel participant:InputPeer banned_r
|
|||
channels.getAdminLog#33ddf480 flags:# channel:InputChannel q:string events_filter:flags.0?ChannelAdminLogEventsFilter admins:flags.1?Vector<InputUser> max_id:long min_id:long limit:int = channels.AdminLogResults;
|
||||
channels.setStickers#ea8ca4f9 channel:InputChannel stickerset:InputStickerSet = Bool;
|
||||
channels.readMessageContents#eab5dc38 channel:InputChannel id:Vector<int> = Bool;
|
||||
channels.deleteHistory#af369d42 channel:InputChannel max_id:int = Bool;
|
||||
channels.deleteHistory#9baa9647 flags:# for_everyone:flags.0?true channel:InputChannel max_id:int = Updates;
|
||||
channels.togglePreHistoryHidden#eabbb94c channel:InputChannel enabled:Bool = Updates;
|
||||
channels.getLeftChannels#8341ecc0 offset:int = messages.Chats;
|
||||
channels.getGroupsForDiscussion#f5dad378 = messages.Chats;
|
||||
|
@ -1695,6 +1746,10 @@ bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;
|
|||
bots.setBotCommands#517165a scope:BotCommandScope lang_code:string commands:Vector<BotCommand> = Bool;
|
||||
bots.resetBotCommands#3d8de0f9 scope:BotCommandScope lang_code:string = Bool;
|
||||
bots.getBotCommands#e34c0dd6 scope:BotCommandScope lang_code:string = Vector<BotCommand>;
|
||||
bots.setBotMenuButton#4504d54f user_id:InputUser button:BotMenuButton = Bool;
|
||||
bots.getBotMenuButton#9c60eb28 user_id:InputUser = BotMenuButton;
|
||||
bots.setBotBroadcastDefaultAdminRights#788464e1 admin_rights:ChatAdminRights = Bool;
|
||||
bots.setBotGroupDefaultAdminRights#925ec9ea admin_rights:ChatAdminRights = Bool;
|
||||
|
||||
payments.getPaymentForm#8a333c8d flags:# peer:InputPeer msg_id:int theme_params:flags.0?DataJSON = payments.PaymentForm;
|
||||
payments.getPaymentReceipt#2478d1cc peer:InputPeer msg_id:int = payments.PaymentReceipt;
|
||||
|
|
|
@ -13462,7 +13462,7 @@
|
|||
<div class="tr-key-row" data-href="/en/ios/groups_and_channels/Channel.Members.Other" data-langpack="ios" data-section="groups_and_channels" data-key="Channel.Members.Other">
|
||||
<div class="tr-value-media"><a class="tr-value-photo bg-image key-layer" style="background-image:url('https://telegra.ph/file/p/56deb30d141/7a4fcd1d2da9ca3bb830317.jpg?c=34,678,280,280,280,280');" href="/screenshots/10696/phrase/Channel.Members.Other" data-layer><div class="screenshot-key" style="padding:81px 20px 42px 4px;"><div class="key-box"></div></div></a></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/ios/groups_and_channels/Channel.Members.Other"><span class="p-value"><span class="value">OTHER SUBSCRIBERS</span></span></a></div>
|
||||
<div class="tr-value-key">Channel.Members.Other</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
|
|
@ -2472,7 +2472,7 @@
|
|||
<div class="tr-key-row" data-href="/en/ios/settings/ChangePhoneNumberNumber.Help" data-langpack="ios" data-section="settings" data-key="ChangePhoneNumberNumber.Help">
|
||||
<div class="tr-value-media"><a class="tr-value-photo bg-image key-layer" style="background-image:url('https://telegra.ph/file/p/c2455848373/7970d64616e2a5ab5ec671d.jpg?c=0,162,742,748,278,280');background-size:139px 140px;background-position:1px 0px;" href="/screenshots/3410/phrase/ChangePhoneNumberNumber.Help" data-layer><div class="screenshot-key" style="padding:39px 15px 84px 5px;"><div class="key-box"></div></div></a></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/ios/settings/ChangePhoneNumberNumber.Help"><span class="p-value"><span class="value">We will send an SMS with a confirmation code to your new number.</span></span></a></div>
|
||||
<div class="tr-value-key">ChangePhoneNumberNumber.Help</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
<div class="tr-key-row" data-href="/en/ios/unsorted/WebApp.RemoveBot" data-langpack="ios" data-section="unsorted" data-key="WebApp.RemoveBot">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/ios/unsorted/WebApp.RemoveBot"><span class="p-value"><span class="value">Remove Bot</span></span></a></div>
|
||||
<div class="tr-value-key">WebApp.RemoveBot</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/NotificationSound.Tones.Upload" data-langpack="macos" data-section="unsorted" data-key="NotificationSound.Tones.Upload">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/NotificationSound.Tones.Upload"><span class="p-value"><span class="value">Upload Tone</span></span></a></div>
|
||||
<div class="tr-value-key">NotificationSound.Tones.Upload</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -67,7 +67,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/NotificationSound.Title" data-langpack="macos" data-section="unsorted" data-key="NotificationSound.Title">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/NotificationSound.Title"><span class="p-value"><span class="value">Notification Sound</span></span></a></div>
|
||||
<div class="tr-value-key">NotificationSound.Title</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -145,7 +145,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/WebApp.RemoveBot" data-langpack="macos" data-section="unsorted" data-key="WebApp.RemoveBot">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/WebApp.RemoveBot"><span class="p-value"><span class="value">Remove Bot</span></span></a></div>
|
||||
<div class="tr-value-key">WebApp.RemoveBot</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -366,7 +366,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/Channel.AddBot.Button.Admin" data-langpack="macos" data-section="unsorted" data-key="Channel.AddBot.Button.Admin">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/Channel.AddBot.Button.Admin"><span class="p-value"><span class="value">Add Bot as Admin</span></span></a></div>
|
||||
<div class="tr-value-key">Channel.AddBot.Button.Admin</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -457,7 +457,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/PhoneNumber.Info" data-langpack="macos" data-section="unsorted" data-key="PhoneNumber.Info">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/PhoneNumber.Info"><span class="p-value"><span class="value">We will send an SMS with a confirmation code to your new number.</span></span></a></div>
|
||||
<div class="tr-value-key">PhoneNumber.Info</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -587,7 +587,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/Chat.Context.SaveRingtone.Add" data-langpack="macos" data-section="unsorted" data-key="Chat.Context.SaveRingtone.Add">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/Chat.Context.SaveRingtone.Add"><span class="p-value"><span class="value">Save for Notifications</span></span></a></div>
|
||||
<div class="tr-value-key">Chat.Context.SaveRingtone.Add</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -600,7 +600,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/ChannelMembers.OtherMembers" data-langpack="macos" data-section="unsorted" data-key="ChannelMembers.OtherMembers">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/ChannelMembers.OtherMembers"><span class="p-value"><span class="value">OTHER SUBSCRIBERS</span></span></a></div>
|
||||
<div class="tr-value-key">ChannelMembers.OtherMembers</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -613,7 +613,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/ChannelMembers.Contacts" data-langpack="macos" data-section="unsorted" data-key="ChannelMembers.Contacts">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/ChannelMembers.Contacts"><span class="p-value"><span class="value">CONTACTS IN THIS CHANNEL</span></span></a></div>
|
||||
<div class="tr-value-key">ChannelMembers.Contacts</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -626,7 +626,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/ReportReason.Drugs" data-langpack="macos" data-section="unsorted" data-key="ReportReason.Drugs">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/ReportReason.Drugs"><span class="p-value"><span class="value">Illegal Drugs</span></span></a></div>
|
||||
<div class="tr-value-key">ReportReason.Drugs</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -639,7 +639,7 @@
|
|||
<div class="tr-key-row" data-href="/en/macos/unsorted/ReportReason.PersonalDetails" data-langpack="macos" data-section="unsorted" data-key="ReportReason.PersonalDetails">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/macos/unsorted/ReportReason.PersonalDetails"><span class="p-value"><span class="value">Personal Details</span></span></a></div>
|
||||
<div class="tr-value-key">ReportReason.PersonalDetails</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
|
|
@ -9209,7 +9209,7 @@
|
|||
<div class="tr-key-row" data-href="/en/tdesktop/settings/lng_ringtones_box_title" data-langpack="tdesktop" data-section="settings" data-key="lng_ringtones_box_title">
|
||||
<div class="tr-value-media"><a class="tr-value-photo bg-image key-layer" style="background-image:url('https://telegra.ph/file/p/396b5806e5a/f587cc3fba6295d4a4ad516.jpg?c=2,56,280,280,280,280');" href="/screenshots/10995/phrase/lng_ringtones_box_title" data-layer><div class="screenshot-key" style="padding:41px 66px 85px 19px;"><div class="key-box"></div></div></a></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/tdesktop/settings/lng_ringtones_box_title"><span class="p-value"><span class="value">Notification Sound</span></span></a></div>
|
||||
<div class="tr-value-key">lng_ringtones_box_title</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
|
|
@ -301,7 +301,7 @@
|
|||
<div class="tr-key-row" data-href="/en/tdesktop/unsorted/lng_bot_add_as_admin" data-langpack="tdesktop" data-section="unsorted" data-key="lng_bot_add_as_admin">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/tdesktop/unsorted/lng_bot_add_as_admin"><span class="p-value"><span class="value">Add Bot as Admin</span></span></a></div>
|
||||
<div class="tr-value-key">lng_bot_add_as_admin</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -418,7 +418,7 @@
|
|||
<div class="tr-key-row" data-href="/en/tdesktop/unsorted/lng_profile_add_bot_as_admin_about" data-langpack="tdesktop" data-section="unsorted" data-key="lng_profile_add_bot_as_admin_about">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/tdesktop/unsorted/lng_profile_add_bot_as_admin_about"><span class="p-value"><span class="value">This bot is able to manage a group or channel.</span></span></a></div>
|
||||
<div class="tr-value-key">lng_profile_add_bot_as_admin_about</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
@ -470,7 +470,7 @@
|
|||
<div class="tr-key-row" data-href="/en/tdesktop/unsorted/lng_profile_add_bot_as_admin" data-langpack="tdesktop" data-section="unsorted" data-key="lng_profile_add_bot_as_admin">
|
||||
<div class="tr-value-media"><div class="tr-value-photo"></div></div>
|
||||
<div class="tr-value-body">
|
||||
|
||||
<span class="has-binding binding"></span>
|
||||
<div class="tr-value-default"><a class="tr-value-link" href="/en/tdesktop/unsorted/lng_profile_add_bot_as_admin"><span class="p-value"><span class="value">Add to Group or Channel</span></span></a></div>
|
||||
<div class="tr-value-key">lng_profile_add_bot_as_admin</div>
|
||||
<div class="tr-value-suggestions">
|
||||
|
|
Loading…
Add table
Reference in a new issue