mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 23:38:26 +01:00
Update content of files
This commit is contained in:
parent
f68e7bb68f
commit
f39170a0b5
16 changed files with 856 additions and 746 deletions
|
@ -66,7 +66,7 @@ Layer…">
|
|||
<ul>
|
||||
<li>Added <strong>unread_reactions_count</strong> parameter in <a href="/constructor/dialog">dialog</a></li>
|
||||
<li>Added <strong>videos</strong> parameter in <a href="/constructor/stickerSet">stickerSet</a></li>
|
||||
<li>Added <strong>rtmp_stream</strong> parameter in <a href="/constructor/groupCall">groupCall</a></li>
|
||||
<li>Added <strong>rtmp_stream</strong>, <strong>listeners_hidden</strong> parameters in <a href="/constructor/groupCall">groupCall</a></li>
|
||||
<li>Added <strong>recent_reactions</strong> parameter, removed <strong>recent_reactons</strong> parameter in <a href="/constructor/messageReactions">messageReactions</a></li>
|
||||
<li>Added <strong>chats</strong> parameter, changed type of <strong>reactions</strong> from <strong>Vector<MessageUserReaction></strong> to <strong>Vector<MessagePeerReaction></strong> in <a href="/constructor/messages.messageReactionsList">messages.messageReactionsList</a></li>
|
||||
</ul>
|
||||
|
@ -77,7 +77,7 @@ Layer…">
|
|||
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
|
||||
<div><pre><code><a href="/constructor/dialog">dialog</a>#a8edd0f5 flags:<a href="/type/%23">#</a> pinned:flags.2?<a href="/constructor/true">true</a> unread_mark:flags.3?<a href="/constructor/true">true</a> peer:<a href="/type/Peer">Peer</a> top_message:<a href="/type/int">int</a> read_inbox_max_id:<a href="/type/int">int</a> read_outbox_max_id:<a href="/type/int">int</a> unread_count:<a href="/type/int">int</a> unread_mentions_count:<a href="/type/int">int</a> unread_reactions_count:<a href="/type/int">int</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> pts:flags.0?<a href="/type/int">int</a> draft:flags.1?<a href="/type/DraftMessage">DraftMessage</a> folder_id:flags.4?<a href="/type/int">int</a> = <a href="/type/Dialog">Dialog</a>;<br>
|
||||
<a href="/constructor/stickerSet">stickerSet</a>#d7df217a flags:<a href="/type/%23">#</a> archived:flags.1?<a href="/constructor/true">true</a> official:flags.2?<a href="/constructor/true">true</a> masks:flags.3?<a href="/constructor/true">true</a> animated:flags.5?<a href="/constructor/true">true</a> videos:flags.6?<a href="/constructor/true">true</a> installed_date:flags.0?<a href="/type/int">int</a> id:<a href="/type/long">long</a> access_hash:<a href="/type/long">long</a> title:<a href="/type/string">string</a> short_name:<a href="/type/string">string</a> thumbs:flags.4?<a href="/type/Vector%20t">Vector</a><<a href="/type/PhotoSize">PhotoSize</a>> thumb_dc_id:flags.4?<a href="/type/int">int</a> thumb_version:flags.4?<a href="/type/int">int</a> count:<a href="/type/int">int</a> hash:<a href="/type/int">int</a> = <a href="/type/StickerSet">StickerSet</a>;<br>
|
||||
<a href="/constructor/groupCall">groupCall</a>#d597650c flags:<a href="/type/%23">#</a> join_muted:flags.1?<a href="/constructor/true">true</a> can_change_join_muted:flags.2?<a href="/constructor/true">true</a> join_date_asc:flags.6?<a href="/constructor/true">true</a> schedule_start_subscribed:flags.8?<a href="/constructor/true">true</a> can_start_video:flags.9?<a href="/constructor/true">true</a> record_video_active:flags.11?<a href="/constructor/true">true</a> rtmp_stream:flags.12?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> access_hash:<a href="/type/long">long</a> participants_count:<a href="/type/int">int</a> title:flags.3?<a href="/type/string">string</a> stream_dc_id:flags.4?<a href="/type/int">int</a> record_start_date:flags.5?<a href="/type/int">int</a> schedule_date:flags.7?<a href="/type/int">int</a> unmuted_video_count:flags.10?<a href="/type/int">int</a> unmuted_video_limit:<a href="/type/int">int</a> version:<a href="/type/int">int</a> = <a href="/type/GroupCall">GroupCall</a>;<br>
|
||||
<a href="/constructor/groupCall">groupCall</a>#d597650c flags:<a href="/type/%23">#</a> join_muted:flags.1?<a href="/constructor/true">true</a> can_change_join_muted:flags.2?<a href="/constructor/true">true</a> join_date_asc:flags.6?<a href="/constructor/true">true</a> schedule_start_subscribed:flags.8?<a href="/constructor/true">true</a> can_start_video:flags.9?<a href="/constructor/true">true</a> record_video_active:flags.11?<a href="/constructor/true">true</a> rtmp_stream:flags.12?<a href="/constructor/true">true</a> listeners_hidden:flags.13?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> access_hash:<a href="/type/long">long</a> participants_count:<a href="/type/int">int</a> title:flags.3?<a href="/type/string">string</a> stream_dc_id:flags.4?<a href="/type/int">int</a> record_start_date:flags.5?<a href="/type/int">int</a> schedule_date:flags.7?<a href="/type/int">int</a> unmuted_video_count:flags.10?<a href="/type/int">int</a> unmuted_video_limit:<a href="/type/int">int</a> version:<a href="/type/int">int</a> = <a href="/type/GroupCall">GroupCall</a>;<br>
|
||||
<a href="/constructor/messageReactions">messageReactions</a>#4f2b9479 flags:<a href="/type/%23">#</a> min:flags.0?<a href="/constructor/true">true</a> can_see_list:flags.2?<a href="/constructor/true">true</a> results:<a href="/type/Vector%20t">Vector</a><<a href="/type/ReactionCount">ReactionCount</a>> recent_reactions:flags.1?<a href="/type/Vector%20t">Vector</a><<a href="/type/MessagePeerReaction">MessagePeerReaction</a>> = <a href="/type/MessageReactions">MessageReactions</a>;
|
||||
<a href="/constructor/messages.messageReactionsList">messages.messageReactionsList</a>#31bd492d flags:<a href="/type/%23">#</a> count:<a href="/type/int">int</a> reactions:<a href="/type/Vector%20t">Vector</a><<a href="/type/MessagePeerReaction">MessagePeerReaction</a>> chats:<a href="/type/Vector%20t">Vector</a><<a href="/type/Chat">Chat</a>> users:<a href="/type/Vector%20t">Vector</a><<a href="/type/User">User</a>> next_offset:flags.0?<a href="/type/string">string</a> = <a href="/type/messages.MessageReactionsList">messages.MessageReactionsList</a>;
|
||||
<a href="/constructor/messagePeerReaction">messagePeerReaction</a>#51b67eff flags:<a href="/type/%23">#</a> big:flags.0?<a href="/constructor/true">true</a> unread:flags.1?<a href="/constructor/true">true</a> peer_id:<a href="/type/Peer">Peer</a> reaction:<a href="/type/string">string</a> = <a href="/type/MessagePeerReaction">MessagePeerReaction</a>;<br>
|
||||
|
|
|
@ -58,11 +58,17 @@
|
|||
|
||||
<a href='/constructor/stats.broadcastStats'>stats.broadcastStats</a>#bdf78394 period:<a href='/type/StatsDateRangeDays'>StatsDateRangeDays</a> followers:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> views_per_post:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> shares_per_post:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> enabled_notifications:<a href='/type/StatsPercentValue'>StatsPercentValue</a> growth_graph:<a href='/type/StatsGraph'>StatsGraph</a> followers_graph:<a href='/type/StatsGraph'>StatsGraph</a> mute_graph:<a href='/type/StatsGraph'>StatsGraph</a> top_hours_graph:<a href='/type/StatsGraph'>StatsGraph</a> interactions_graph:<a href='/type/StatsGraph'>StatsGraph</a> iv_interactions_graph:<a href='/type/StatsGraph'>StatsGraph</a> views_by_source_graph:<a href='/type/StatsGraph'>StatsGraph</a> new_followers_by_source_graph:<a href='/type/StatsGraph'>StatsGraph</a> languages_graph:<a href='/type/StatsGraph'>StatsGraph</a> recent_message_interactions:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageInteractionCounters'>MessageInteractionCounters</a>> = <a href='/type/stats.BroadcastStats'>stats.BroadcastStats</a>;
|
||||
|
||||
<a href='/constructor/messages.chatFull'>messages.chatFull</a>#e5d7d19c full_chat:<a href='/type/ChatFull'>ChatFull</a> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;
|
||||
<a href='/constructor/channelFull'>channelFull</a>#e13c3d20 flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.getBroadcastStats'>stats.getBroadcastStats</a>#ab42441a flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/stats.BroadcastStats'>stats.BroadcastStats</a>;
|
||||
<a href='/method/stats.loadAsyncGraph'>stats.loadAsyncGraph</a>#621d5fa0 flags:<a href='/type/%23'>#</a> token:<a href='/type/string'>string</a> x:flags.0?<a href='/type/long'>long</a> = <a href='/type/StatsGraph'>StatsGraph</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">channels</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can call <a href="/method/stats.getBroadcastStats">stats.getBroadcastStats</a> to get detailed channel statistics.<br>
|
||||
<a href='/method/stats.loadAsyncGraph'>stats.loadAsyncGraph</a>#621d5fa0 flags:<a href='/type/%23'>#</a> token:<a href='/type/string'>string</a> x:flags.0?<a href='/type/long'>long</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
|
||||
<a href='/method/channels.getFullChannel'>channels.getFullChannel</a>#8736a09 channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">channels</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can invoke <a href="/method/stats.getBroadcastStats">stats.getBroadcastStats</a> to get detailed channel statistics.<br>
|
||||
The query must be sent to the datacenter with ID <code>channelFull.stats_dc</code>, obtainable using <a href="/method/channels.getFullChannel">channels.getFullChannel</a>.<br>
|
||||
The returned <a href="/constructor/stats.broadcastStats">stats.broadcastStats</a> contains multiple statistics: </p>
|
||||
<ul>
|
||||
<li>Period-related statistics: a pair of values, one at the beginning and one at the end of the period in consideration (<code>period</code>). <br> The <code>period</code> typically depends on channel activity.<ul>
|
||||
|
@ -87,18 +93,30 @@ Note that in this case, <code>current</code> refers to the <code>period</code> i
|
|||
|
||||
<a href='/constructor/stats.megagroupStats'>stats.megagroupStats</a>#ef7ff916 period:<a href='/type/StatsDateRangeDays'>StatsDateRangeDays</a> members:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> messages:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> viewers:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> posters:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> growth_graph:<a href='/type/StatsGraph'>StatsGraph</a> members_graph:<a href='/type/StatsGraph'>StatsGraph</a> new_members_by_source_graph:<a href='/type/StatsGraph'>StatsGraph</a> languages_graph:<a href='/type/StatsGraph'>StatsGraph</a> messages_graph:<a href='/type/StatsGraph'>StatsGraph</a> actions_graph:<a href='/type/StatsGraph'>StatsGraph</a> top_hours_graph:<a href='/type/StatsGraph'>StatsGraph</a> weekdays_graph:<a href='/type/StatsGraph'>StatsGraph</a> top_posters:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StatsGroupTopPoster'>StatsGroupTopPoster</a>> top_admins:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StatsGroupTopAdmin'>StatsGroupTopAdmin</a>> top_inviters:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StatsGroupTopInviter'>StatsGroupTopInviter</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/stats.MegagroupStats'>stats.MegagroupStats</a>;
|
||||
|
||||
<a href='/constructor/messages.chatFull'>messages.chatFull</a>#e5d7d19c full_chat:<a href='/type/ChatFull'>ChatFull</a> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;
|
||||
<a href='/constructor/channelFull'>channelFull</a>#e13c3d20 flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.getMegagroupStats'>stats.getMegagroupStats</a>#dcdf8607 flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/stats.MegagroupStats'>stats.MegagroupStats</a>;</code></pre>
|
||||
<a href='/method/stats.getMegagroupStats'>stats.getMegagroupStats</a>#dcdf8607 flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/stats.MegagroupStats'>stats.MegagroupStats</a>;
|
||||
|
||||
<a href='/method/channels.getFullChannel'>channels.getFullChannel</a>#8736a09 channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">supergroups</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can call <a href="/method/stats.getMegagroupStats">stats.getMegagroupStats</a> to get detailed supergroup statistics.<br>
|
||||
The query must be sent to the datacenter with ID <code>channelFull.stats_dc</code>, obtainable using <a href="/method/channels.getFullChannel">channels.getFullChannel</a>.<br>
|
||||
The returned <a href="/constructor/stats.broadcastStats">stats.broadcastStats</a> contains multiple statistics, see the <a href="/constructor/stats.broadcastStats">constructor page for more info »</a>. </p>
|
||||
<h3><a class="anchor" href="#message-statistics" id="message-statistics" name="message-statistics"><i class="anchor-icon"></i></a>Message statistics</h3>
|
||||
<pre><code><a href='/constructor/stats.messageStats'>stats.messageStats</a>#8999f295 views_graph:<a href='/type/StatsGraph'>StatsGraph</a> = <a href='/type/stats.MessageStats'>stats.MessageStats</a>;
|
||||
|
||||
<a href='/constructor/messages.chatFull'>messages.chatFull</a>#e5d7d19c full_chat:<a href='/type/ChatFull'>ChatFull</a> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;
|
||||
<a href='/constructor/channelFull'>channelFull</a>#e13c3d20 flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.getMessageStats'>stats.getMessageStats</a>#b6e0a3f5 flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> msg_id:<a href='/type/int'>int</a> = <a href='/type/stats.MessageStats'>stats.MessageStats</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">channels</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can call <a href="/method/stats.getMessageStats">stats.getMessageStats</a> to get statistics of a specific message.<br>
|
||||
<a href='/method/stats.getMessageStats'>stats.getMessageStats</a>#b6e0a3f5 flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> msg_id:<a href='/type/int'>int</a> = <a href='/type/stats.MessageStats'>stats.MessageStats</a>;
|
||||
|
||||
<a href='/method/channels.getFullChannel'>channels.getFullChannel</a>#8736a09 channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">channels</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can invoke <a href="/method/stats.getMessageStats">stats.getMessageStats</a> to get statistics of a specific message.<br>
|
||||
The query must be sent to the datacenter with ID <code>channelFull.stats_dc</code>, obtainable using <a href="/method/channels.getFullChannel">channels.getFullChannel</a>.<br>
|
||||
The returned <a href="/constructor/stats.messageStats">stats.messageStats</a> contains the view graph of the message. </p>
|
||||
<h2><a class="anchor" href="#graph-visualization" id="graph-visualization" name="graph-visualization"><i class="anchor-icon"></i></a>Graph visualization</h2>
|
||||
<p>There are four available visualizations for graph types:</p>
|
||||
|
|
|
@ -44,33 +44,34 @@ To learn how to create…">
|
|||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<blockquote>
|
||||
<p>The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.<br>To learn how to create and set up a bot, please consult our <a href="https://core.telegram.org/bots"><strong>Introduction to Bots »</strong></a></p>
|
||||
<p>The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
|
||||
To learn how to create and set up a bot, please consult our <a href="https://core.telegram.org/bots"><strong>Introduction to Bots »</strong></a></p>
|
||||
</blockquote>
|
||||
<p>You will find all changes to our <a href="/bots/api"><strong>Bot API</strong></a> on this page.</p>
|
||||
<h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
|
||||
<h3><a class="anchor" href="#recent-changes" id="recent-changes" name="recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
|
||||
<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="january-31-2022" href="#january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h3>
|
||||
<h3><a class="anchor" href="#january-31-2022" id="january-31-2022" name="january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h3>
|
||||
<p><strong>Bot API 5.7</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/video-stickers-better-reactions">Video Stickers</a>.</li>
|
||||
<li>Added the field <em>is_video</em> to the classes <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#stickerset">StickerSet</a>.</li>
|
||||
<li>Added the parameter <em>webm_sticker</em> to the methods <a href="/bots/api#createnewstickerset">createNewStickerSet</a> and <a href="/bots/api#addstickertoset">addStickerToSet</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-30-2021" href="#december-30-2021"><i class="anchor-icon"></i></a>December 30, 2021</h3>
|
||||
<h3><a class="anchor" href="#december-30-2021" id="december-30-2021" name="december-30-2021"><i class="anchor-icon"></i></a>December 30, 2021</h3>
|
||||
<p><strong>Bot API 5.6</strong></p>
|
||||
<ul>
|
||||
<li>Improved support for <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more#protected-content-in-groups-and-channels">Protected Content</a>.</li>
|
||||
<li>Added the parameter <em>protect_content</em> to the methods <a href="/bots/api#sendmessage">sendMessage</a>, <a href="/bots/api#sendphoto">sendPhoto</a>, <a href="/bots/api#sendvideo">sendVideo</a>, <a href="/bots/api#sendanimation">sendAnimation</a>, <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#senddocument">sendDocument</a>, <a href="/bots/api#sendsticker">sendSticker</a>, <a href="/bots/api#sendvideonote">sendVideoNote</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#sendlocation">sendLocation</a>, <a href="/bots/api#sendvenue">sendVenue</a>, <a href="/bots/api#sendcontact">sendContact</a>, <a href="/bots/api#sendpoll">sendPoll</a>, <a href="/bots/api#senddice">sendDice</a>, <a href="/bots/api#sendinvoice">sendInvoice</a>, <a href="/bots/api#sendgame">sendGame</a>, <a href="/bots/api#sendmediagroup">sendMediaGroup</a>, <a href="/bots/api#copymessage">copyMessage</a>, <a href="/bots/api#forwardmessage">forwardMessage</a> to allow sending messages with protected content to any chat.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/reactions-spoilers-translations#spoilers">spoiler entities</a>, which will work in Telegram versions released after December 30, 2021. Older clients will display <em>unsupported message</em>.</li>
|
||||
<li>Added new <a href="/bots/api#messageentity">MessageEntity</a> type “spoiler”.</li>
|
||||
<li>Added new <a href="/bots/api#messageentity">MessageEntity</a> type "spoiler".</li>
|
||||
<li>Added the ability to specify spoiler entities using <a href="/bots/api#html-style">HTML</a> and <a href="/bots/api#markdownv2-style">MarkdownV2</a> formatting options.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-7-2021" href="#december-7-2021"><i class="anchor-icon"></i></a>December 7, 2021</h3>
|
||||
<h3><a class="anchor" href="#december-7-2021" id="december-7-2021" name="december-7-2021"><i class="anchor-icon"></i></a>December 7, 2021</h3>
|
||||
<p><strong>Bot API 5.5</strong></p>
|
||||
<ul>
|
||||
<li>Bots are now allowed to contact users who sent a join request to a chat where the bot is an administrator with the <em>can_invite_users</em> administrator right – even if the user never interacted with the bot before.</li>
|
||||
<li>Bots are now allowed to contact users who sent a join request to a chat where the bot is an administrator with the <em>can_invite_users</em> administrator right – even if the user never interacted with the bot before.</li>
|
||||
<li>Added support for mentioning users by their ID in inline keyboards. This will only work in Telegram versions released after December 7, 2021. Older clients will display <em>unsupported message</em>.</li>
|
||||
<li>Added the methods <a href="/bots/api#banchatsenderchat">banChatSenderChat</a> and <a href="/bots/api#unbanchatsenderchat">unbanChatSenderChat</a> for banning and unbanning channel chats in supergroups and channels.</li>
|
||||
<li>Added the field <em>has_private_forwards</em> to the class <a href="/bots/api#chat">Chat</a> for private chats, which can be used to check the possibility of mentioning the user by their ID.</li>
|
||||
|
@ -80,7 +81,7 @@ 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="/bots/api#message">Message</a> and <a href="/bots/api#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="/bots/api#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>
|
||||
<h3><a class="anchor" name="november-5-2021" href="#november-5-2021"><i class="anchor-icon"></i></a>November 5, 2021</h3>
|
||||
<h3><a class="anchor" href="#november-5-2021" id="november-5-2021" name="november-5-2021"><i class="anchor-icon"></i></a>November 5, 2021</h3>
|
||||
<p><strong>Bot API 5.4</strong></p>
|
||||
<ul>
|
||||
<li>Added the the parameter <code>creates_join_request</code> to the methods <a href="/bots/api#createchatinvitelink">createChatInviteLink</a> and <a href="/bots/api#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>
|
||||
|
@ -92,10 +93,11 @@ To learn how to create…">
|
|||
</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>User identifiers will become bigger than <code>2^31 - 1</code> before the end of this year and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<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>
|
||||
User identifiers will become bigger than <code>2^31 - 1</code> before the end of this year and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="june-25-2021" href="#june-25-2021"><i class="anchor-icon"></i></a>June 25, 2021</h3>
|
||||
<h3><a class="anchor" href="#june-25-2021" id="june-25-2021" name="june-25-2021"><i class="anchor-icon"></i></a>June 25, 2021</h3>
|
||||
<p><strong>Bot API 5.3</strong></p>
|
||||
<p><strong>Personalized Commands</strong></p>
|
||||
<ul>
|
||||
|
@ -103,8 +105,8 @@ To learn how to create…">
|
|||
<li>Added the class <a href="/bots/api#botcommandscope">BotCommandScope</a>, describing the scope to which bot commands apply.</li>
|
||||
<li>Added the parameters <code>scope</code> and <code>language_code</code> to the method <a href="/bots/api#setmycommands">setMyCommands</a> to allow bots specify different commands for different chats and users.</li>
|
||||
<li>Added the parameters <code>scope</code> and <code>language_code</code> to the method <a href="/bots/api#getmycommands">getMyCommands</a>.</li>
|
||||
<li>Added the method <a href="/bots/api#deletemycommands">deleteMyCommands</a> to allow deletion of the bot's commands for the given scope and user language.</li>
|
||||
<li>Improved visibility of bot commands in Telegram apps with the new 'Menu' button in chats with bots, read more on the <a href="https://telegram.org/blog/animated-backgrounds#bot-menu">blog</a>.</li>
|
||||
<li>Added the method <a href="/bots/api#deletemycommands">deleteMyCommands</a> to allow deletion of the bot's commands for the given scope and user language.</li>
|
||||
<li>Improved visibility of bot commands in Telegram apps with the new 'Menu' button in chats with bots, read more on the <a href="https://telegram.org/blog/animated-backgrounds#bot-menu">blog</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Custom Placeholders</strong></p>
|
||||
<ul>
|
||||
|
@ -119,35 +121,39 @@ To learn how to create…">
|
|||
</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 one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<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>
|
||||
After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="april-26-2021" href="#april-26-2021"><i class="anchor-icon"></i></a>April 26, 2021</h3>
|
||||
<h3><a class="anchor" href="#april-26-2021" id="april-26-2021" name="april-26-2021"><i class="anchor-icon"></i></a>April 26, 2021</h3>
|
||||
<p><strong>Bot API 5.2</strong></p>
|
||||
<ul>
|
||||
<li>Support for <a href="https://telegram.org/blog/payments-2-0-scheduled-voice-chats">Payments 2.0</a>, see <a href="https://core.telegram.org/bots/payments">this manual</a> for more details about the <strong>Bot Payments API</strong>.</li>
|
||||
<li>Added the type <a href="/bots/api#inputinvoicemessagecontent">InputInvoiceMessageContent</a> to support sending invoices as inline query results.</li>
|
||||
<li>Allowed sending invoices to group, supergroup and channel chats.</li>
|
||||
<li>Added the fields <em>max_tip_amount</em> and <em>suggested_tip_amounts</em> to the method <a href="/bots/api#sendinvoice">sendInvoice</a> to allow adding optional tips to the payment.</li>
|
||||
<li>The parameter <em>start_parameter</em> of the method <a href="/bots/api#sendinvoice">sendInvoice</a> became optional. If the parameter isn't specified, the invoice can be paid directly from forwarded messages.</li>
|
||||
<li>The parameter <em>start_parameter</em> of the method <a href="/bots/api#sendinvoice">sendInvoice</a> became optional. If the parameter isn't specified, the invoice can be paid directly from forwarded messages.</li>
|
||||
<li>Added the field <em>chat_type</em> to the class <a href="/bots/api#inlinequery">InlineQuery</a>, containing the type of the chat, from which the inline request was sent.</li>
|
||||
<li>Added the type <a href="/bots/api#voicechatscheduled">VoiceChatScheduled</a> and the field <em>voice_chat_scheduled</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Fixed an error in <a href="/bots/api#sendchataction">sendChatAction</a> documentation to correctly mention “record_voice” and “upload_voice” instead of “record_audio” and “upload_audio” for related to voice note actions. Old action names will still work for backward compatibility.</li>
|
||||
<li>Fixed an error in <a href="/bots/api#sendchataction">sendChatAction</a> documentation to correctly mention "record_voice" and "upload_voice" instead of "record_audio" and "upload_audio" for related to voice note actions. Old action names will still work for backward compatibility.</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 Bot API update (Bot API 5.3) there will be a one-time change of the value of the field <code>file_unique_id</code> in objects of the type <a href="/bots/api#photosize">PhotoSize</a> and of the fields <code>small_file_unique_id</code> and <code>big_file_unique_id</code> in objects of the type <a href="/bots/api#chatphoto">ChatPhoto</a>.</p>
|
||||
<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>
|
||||
After the next Bot API update (Bot API 5.3) there will be a one-time change of the value of the field <code>file_unique_id</code> in objects of the type <a href="/bots/api#photosize">PhotoSize</a> and of the fields <code>small_file_unique_id</code> and <code>big_file_unique_id</code> in objects of the type <a href="/bots/api#chatphoto">ChatPhoto</a>.</p>
|
||||
</blockquote>
|
||||
<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>Service messages about non-bot users joining the chat will be soon removed from large groups. We recommend using the “chat_member” update as a replacement.</p>
|
||||
<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>
|
||||
Service messages about non-bot users joining the chat will be soon removed from large groups. We recommend using the "chat_member" update as a replacement.</p>
|
||||
</blockquote>
|
||||
<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 one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<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>
|
||||
After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="march-9-2021" href="#march-9-2021"><i class="anchor-icon"></i></a>March 9, 2021</h3>
|
||||
<h3><a class="anchor" href="#march-9-2021" id="march-9-2021" name="march-9-2021"><i class="anchor-icon"></i></a>March 9, 2021</h3>
|
||||
<p><strong>Bot API 5.1</strong></p>
|
||||
<p><strong>Added two new update types</strong></p>
|
||||
<ul>
|
||||
|
@ -176,14 +182,15 @@ To learn how to create…">
|
|||
</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 one of the upcoming Bot API updates, some user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<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>
|
||||
After one of the upcoming Bot API updates, some user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="november-4-2020" href="#november-4-2020"><i class="anchor-icon"></i></a>November 4, 2020</h3>
|
||||
<h3><a class="anchor" href="#november-4-2020" id="november-4-2020" name="november-4-2020"><i class="anchor-icon"></i></a>November 4, 2020</h3>
|
||||
<p>Introducing <strong>Bot API 5.0</strong></p>
|
||||
<p><strong>Run Your Own Bot API Server</strong></p>
|
||||
<ul>
|
||||
<li>Bot API source code is now available at <a href="https://github.com/tdlib/telegram-bot-api">telegram-bot-api</a>. You can now run your <strong>own Bot API server</strong> locally, boosting your bots' performance.</li>
|
||||
<li>Bot API source code is now available at <a href="https://github.com/tdlib/telegram-bot-api">telegram-bot-api</a>. You can now run your <strong>own Bot API server</strong> locally, boosting your bots' performance.</li>
|
||||
<li>Added the method <a href="/bots/api#logout">logOut</a>, which can be used to log out from the cloud Bot API server before launching your bot locally. You <strong>must</strong> log out the bot before running it locally, otherwise there is no guarantee that the bot will receive all updates.</li>
|
||||
<li>Added the method <a href="/bots/api#close">close</a>, which can be used to close the bot instance before moving it from one local server to another.</li>
|
||||
</ul>
|
||||
|
@ -199,7 +206,7 @@ To learn how to create…">
|
|||
</ul>
|
||||
<p><strong>Working with Groups</strong></p>
|
||||
<ul>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the user's bio for private chats if available.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the user's bio for private chats if available.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the identifier of the linked chat for supergroups and channels, i.e. the discussion group identifier for a channel and vice versa.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the location to which the supergroup is connected (see <a href="https://telegram.org/blog/contacts-local-groups">Local Groups</a>). Added the class <a href="/bots/api#chatlocation">ChatLocation</a> to represent the location.</li>
|
||||
<li>Added the parameter <em>only_if_banned</em> to the method <a href="/bots/api#unbanchatmember">unbanChatMember</a> to allow safe unban.</li>
|
||||
|
@ -222,7 +229,7 @@ To learn how to create…">
|
|||
<p><strong>Live Locations</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>live_period</em> to the class <a href="/bots/api#location">Location</a>, representing a maximum period for which the live location can be updated.</li>
|
||||
<li>Added support for live location <a href="https://en.wikipedia.org/wiki/Heading_(navigation)">heading</a>: added the field <em>heading</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>heading</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added support for live location [heading](<a href="https://en.wikipedia.org/wiki/Heading_(navigation&#41">https://en.wikipedia.org/wiki/Heading_(navigation&#41</a>;): added the field <em>heading</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>heading</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added support for proximity alerts in live locations: added the field <em>proximity_alert_radius</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>proximity_alert_radius</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added the type <a href="/bots/api#proximityalerttriggered">ProximityAlertTriggered</a> and the field <em>proximity_alert_triggered</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added possibility to specify the horizontal accuracy of a location. Added the field <em>horizontal_accuracy</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>horizontal_accuracy</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
|
@ -246,14 +253,14 @@ To learn how to create…">
|
|||
<ul>
|
||||
<li>Supported the new <strong>football</strong> and <strong>slot machine</strong> animations for the random <a href="/bots/api#dice">dice</a>. Choose between different animations (dice, darts, basketball, football, slot machine) by specifying the <em>emoji</em> parameter in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="june-4-2020" href="#june-4-2020"><i class="anchor-icon"></i></a>June 4, 2020</h3>
|
||||
<h3><a class="anchor" href="#june-4-2020" id="june-4-2020" name="june-4-2020"><i class="anchor-icon"></i></a>June 4, 2020</h3>
|
||||
<p><strong>Bot API 4.9</strong></p>
|
||||
<ul>
|
||||
<li>Added the new field <em>via_bot</em> to the <a href="/bots/api#message">Message</a> object. You can now know which bot was used to send a message.</li>
|
||||
<li>Supported video thumbnails for inline <a href="/bots/api#inlinequeryresultgif">GIF</a> and <a href="/bots/api#inlinequeryresultmpeg4gif">MPEG4</a> animations.</li>
|
||||
<li>Supported the new basketball animation for the random <a href="/bots/api#dice">dice</a>. Choose between different animations (dice, darts, basketball) by specifying the <em>emoji</em> parameter in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="april-24-2020" href="#april-24-2020"><i class="anchor-icon"></i></a>April 24, 2020</h3>
|
||||
<h3><a class="anchor" href="#april-24-2020" id="april-24-2020" name="april-24-2020"><i class="anchor-icon"></i></a>April 24, 2020</h3>
|
||||
<p><strong>Bot API 4.8</strong></p>
|
||||
<ul>
|
||||
<li>Supported explanations for <a href="https://telegram.org/blog/400-million#better-quizzes">Quizzes 2.0</a>. Add explanations by specifying the parameters <em>explanation</em> and <em>explanation_parse_mode</em> in the method <a href="/bots/api#sendpoll">sendPoll</a>.</li>
|
||||
|
@ -263,19 +270,19 @@ To learn how to create…">
|
|||
<li>Supported the new <a href="https://telegram.org/blog/400-million#bullseye">darts</a> animation for the dice mini-game. Choose between the default dice animation and darts animation by specifying the parameter <em>emoji</em> in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
<li>Added the field <em>emoji</em> to the <a href="/bots/api#dice">Dice</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="march-30-2020" href="#march-30-2020"><i class="anchor-icon"></i></a>March 30, 2020</h3>
|
||||
<h3><a class="anchor" href="#march-30-2020" id="march-30-2020" name="march-30-2020"><i class="anchor-icon"></i></a>March 30, 2020</h3>
|
||||
<p><strong>Bot API 4.7</strong></p>
|
||||
<ul>
|
||||
<li>Added the method <a href="/bots/api#senddice">sendDice</a> for sending a dice message, which will have a random value from 1 to 6. (Yes, we're aware of the <em>“proper”</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</li>
|
||||
<li>Added the method <a href="/bots/api#senddice">sendDice</a> for sending a dice message, which will have a random value from 1 to 6. (Yes, we're aware of the <em>"proper"</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</li>
|
||||
<li>Added the field <a href="/bots/api#dice">dice</a> to the <a href="/bots/api#message">Message</a> object.</li>
|
||||
<li>Added the method <a href="/bots/api#getmycommands">getMyCommands</a> for getting the current list of the bot's commands.</li>
|
||||
<li>Added the method <a href="/bots/api#setmycommands">setMyCommands</a> for changing the list of the bot's commands through the Bot API instead of <a href="https://t.me/botfather">@BotFather</a>.</li>
|
||||
<li>Added the method <a href="/bots/api#getmycommands">getMyCommands</a> for getting the current list of the bot's commands.</li>
|
||||
<li>Added the method <a href="/bots/api#setmycommands">setMyCommands</a> for changing the list of the bot's commands through the Bot API instead of <a href="https://t.me/botfather">@BotFather</a>.</li>
|
||||
<li>Added the ability to create animated sticker sets by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <a href="/bots/api#createnewstickerset">createNewStickerSet</a>.</li>
|
||||
<li>Added the ability to add animated stickers to sets created by the bot by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <a href="/bots/api#addstickertoset">addStickerToSet</a>.</li>
|
||||
<li>Added the field <em>thumb</em> to the <a href="/bots/api#stickerset">StickerSet</a> object.</li>
|
||||
<li>Added the ability to change thumbnails of sticker sets created by the bot using the method <a href="/bots/api#setstickersetthumb">setStickerSetThumb</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-23-2020" href="#january-23-2020"><i class="anchor-icon"></i></a>January 23, 2020</h3>
|
||||
<h3><a class="anchor" href="#january-23-2020" id="january-23-2020" name="january-23-2020"><i class="anchor-icon"></i></a>January 23, 2020</h3>
|
||||
<p><strong>Bot API 4.6</strong></p>
|
||||
<ul>
|
||||
<li>Supported <a href="https://telegram.org/blog/polls-2-0-vmq">Polls 2.0</a>.</li>
|
||||
|
@ -287,19 +294,19 @@ To learn how to create…">
|
|||
<li>Added more information about the bot in response to the <a href="/bots/api#getme">getMe</a> request: added the fields <em>can_join_groups</em>, <em>can_read_all_group_messages</em> and <em>supports_inline_queries</em> to the <a href="/bots/api#user">User</a> object.</li>
|
||||
<li>Added the optional field <em>language</em> to the <a href="/bots/api#messageentity">MessageEntity</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-31-2019" href="#december-31-2019"><i class="anchor-icon"></i></a>December 31, 2019</h3>
|
||||
<h3><a class="anchor" href="#december-31-2019" id="december-31-2019" name="december-31-2019"><i class="anchor-icon"></i></a>December 31, 2019</h3>
|
||||
<p><strong>Bot API 4.5</strong></p>
|
||||
<ul>
|
||||
<li>Added support for two new <a href="/bots/api#messageentity">MessageEntity</a> types, <em>underline</em> and <em>strikethrough</em>.</li>
|
||||
<li>Added support for nested <a href="/bots/api#messageentity">MessageEntity</a> objects. Entities can now contain other entities. If two entities have common characters then one of them is fully contained inside the other.</li>
|
||||
<li>Added support for nested entities and the new tags <code><u>/<ins></code> (for underlined text) and <code><s>/<strike>/<del></code> (for strikethrough text) in parse mode HTML.</li>
|
||||
<li>Added a new parse mode, <a href="/bots/api#markdownv2-style">MarkdownV2</a>, which supports nested entities and two new entities <code>__</code> (for underlined text) and <code>~</code> (for strikethrough text). Parse mode <a href="/bots/api#markdown-style">Markdown</a> remains unchanged for backward compatibility.</li>
|
||||
<li>Added the field <em>file_unique_id</em> to the objects <a href="/bots/api#animation">Animation</a>, <a href="/bots/api#audio">Audio</a>, <a href="/bots/api#document">Document</a>, <a href="/bots/api#passportfile">PassportFile</a>, <a href="/bots/api#photosize">PhotoSize</a>, <a href="/bots/api#sticker">Sticker</a>, <a href="/bots/api#video">Video</a>, <a href="/bots/api#videonote">VideoNote</a>, <a href="/bots/api#voice">Voice</a>, <a href="/bots/api#file">File</a> and the fields <em>small_file_unique_id</em> and <em>big_file_unique_id</em> to the object <a href="/bots/api#chatphoto">ChatPhoto</a>. The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots, but can't be used to download or reuse the file.</li>
|
||||
<li>Added the field <em>file_unique_id</em> to the objects <a href="/bots/api#animation">Animation</a>, <a href="/bots/api#audio">Audio</a>, <a href="/bots/api#document">Document</a>, <a href="/bots/api#passportfile">PassportFile</a>, <a href="/bots/api#photosize">PhotoSize</a>, <a href="/bots/api#sticker">Sticker</a>, <a href="/bots/api#video">Video</a>, <a href="/bots/api#videonote">VideoNote</a>, <a href="/bots/api#voice">Voice</a>, <a href="/bots/api#file">File</a> and the fields <em>small_file_unique_id</em> and <em>big_file_unique_id</em> to the object <a href="/bots/api#chatphoto">ChatPhoto</a>. The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots, but can't be used to download or reuse the file.</li>
|
||||
<li>Added the field <em>custom_title</em> to the <a href="/bots/api#chatmember">ChatMember</a> object.</li>
|
||||
<li>Added the new method <a href="/bots/api#setchatadministratorcustomtitle">setChatAdministratorCustomTitle</a> to manage the custom titles of administrators promoted by the bot.</li>
|
||||
<li>Added the field <em>slow_mode_delay</em> to the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-29-2019" href="#july-29-2019"><i class="anchor-icon"></i></a>July 29, 2019</h3>
|
||||
<h3><a class="anchor" href="#july-29-2019" id="july-29-2019" name="july-29-2019"><i class="anchor-icon"></i></a>July 29, 2019</h3>
|
||||
<p><strong>Bot API 4.4</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/animated-stickers"><strong>animated stickers</strong></a>. New field <em>is_animated</em> in <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#stickerset">StickerSet</a> objects, animated stickers can now be used in <a href="/bots/api#sendsticker">sendSticker</a> and <a href="/bots/api#inlinequeryresultcachedsticker">InlineQueryResultCachedSticker</a>.</li>
|
||||
|
@ -307,49 +314,48 @@ To learn how to create…">
|
|||
<li>The field <em>all_members_are_administrators</em> has been removed from the documentation for the <a href="/bots/api#chat">Chat</a> object. The field is still returned in the object for backward compatibility, but new bots should use the <em>permissions</em> field instead.</li>
|
||||
<li>Added support for more permissions for group and supergroup members: added the new field <em>can_send_polls</em> to <a href="/bots/api#chatmember">ChatMember</a> object, added <em>can_change_info</em>, <em>can_invite_users</em>, <em>can_pin_messages</em> in <a href="/bots/api#chatmember">ChatMember</a> object for restricted users (previously available only for administrators).</li>
|
||||
<li>The method <a href="/bots/api#restrictchatmember">restrictChatMember</a> now takes the new user permissions in a single argument of the type <a href="/bots/api#chatpermissions">ChatPermissions</a>. The old way of passing parameters will keep working for a while for backward compatibility.</li>
|
||||
<li>Added <em>description</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#setchatdescription">setChatDescription</a> and receive the group's description in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>Added <em>invite_link</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#exportchatinvitelink">exportChatInviteLink</a> and receive the group's invite link in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>Added <em>description</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#setchatdescription">setChatDescription</a> and receive the group's description in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>Added <em>invite_link</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#exportchatinvitelink">exportChatInviteLink</a> and receive the group's invite link in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>File identifiers from the <a href="/bots/api#chatphoto">ChatPhoto</a> object are now invalidated and can no longer be used whenever the photo is changed.</li>
|
||||
<li>All <strong>webhook requests</strong> from the Bot API are now coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
<li>All <strong>webhook requests</strong> from the Bot API are now coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks">https://core.telegram.org/bots/webhooks</a>.</li>
|
||||
<li>As of the <strong>next Bot API</strong> update (<strong>version 4.5</strong>), nested <a href="/bots/api#messageentity">MessageEntity</a> objects will be allowed in message texts and captions. Please make sure that your code can correctly handle such entities.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-31-2019" href="#may-31-2019"><i class="anchor-icon"></i></a>May 31, 2019</h3>
|
||||
<h3><a class="anchor" href="#may-31-2019" id="may-31-2019" name="may-31-2019"><i class="anchor-icon"></i></a>May 31, 2019</h3>
|
||||
<p><strong>Bot API 4.3</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots"><strong>Seamless Telegram Login</strong></a> on external websites.</li>
|
||||
<li>Added the new object <a href="/bots/api#loginurl">LoginUrl</a> and the new field <em>login_url</em> to the <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a> object which allows to <strong>automatically authorize</strong> users before they go to a URL specified by the bot. Users will be asked to confirm authorization in their Telegram app (needs version 5.7 or higher) when they press the button:</li>
|
||||
</ul>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c" target="_blank"><img src="/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9" title="TITLE" alt="TITLE" srcset="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c , 2x" /></a>
|
||||
<a href="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c" target="_blank"><img src="/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9" title="TITLE" alt="TITLE" srcset="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c , 2x"></a>
|
||||
</div>
|
||||
|
||||
<p><strong>Also in this update:</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <code>reply_markup</code> to the <a href="/bots/api#message">Message</a> object, containing the inline keyboard attached to the message.</li>
|
||||
<li>If a message with an inline keyboard is forwarded, the forwarded message will now have an inline keyboard if the keyboard contained only <em>url</em> and <em>login_url</em> buttons or if the message was sent via a bot and the keyboard contained only <em>url</em>, <em>login_url</em>, <em>switch_inline_query</em> or <em>switch_inline_query_current_chat</em> buttons. In the latter case, <em>switch_inline_query_current_chat</em> buttons are replaced with <em>switch_inline_query</em> buttons.</li>
|
||||
<li>Bots now receive the <em>edited_message</em> <a href="/bots/api#update">Update</a> even if only <em>Message.reply_markup</em> has changed.</li>
|
||||
<li>Bots that have the <em>can_edit_messages</em> right in a channel can now use the method <a href="/bots/api#editmessagereplymarkup">editMessageReplyMarkup</a> for messages written by other administrators forever without the 48 hours limit.</li>
|
||||
<li>Don't forget that starting in <strong>July 2019</strong>, <strong>webhook requests</strong> from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
<li>Don't forget that starting in <strong>July 2019</strong>, <strong>webhook requests</strong> from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks">https://core.telegram.org/bots/webhooks</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="april-14-2019" href="#april-14-2019"><i class="anchor-icon"></i></a>April 14, 2019</h3>
|
||||
<h3><a class="anchor" href="#april-14-2019" id="april-14-2019" name="april-14-2019"><i class="anchor-icon"></i></a>April 14, 2019</h3>
|
||||
<p><strong>Bot API 4.2</strong></p>
|
||||
<ul>
|
||||
<li>Added support for native polls: added the object <a href="/bots/api#poll">Poll</a>, the methods <a href="/bots/api#sendpoll">sendPoll</a> and <a href="/bots/api#stoppoll">stopPoll</a> and the field <em>poll</em> in the <a href="/bots/api#message">Message</a> and <a href="/bots/api#update">Update</a> objects.</li>
|
||||
<li>The method <a href="/bots/api#deletemessage">deleteMessage</a> can now be used to delete messages sent by a user to the bot in private chats within 48 hours.</li>
|
||||
<li>Added support for pinned messages in basic groups in addition to supergroups and channel chats: you can pass group's chat_id to <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a>, and receive the pinned group message in <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added support for pinned messages in basic groups in addition to supergroups and channel chats: you can pass group's chat_id to <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a>, and receive the pinned group message in <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added the field <em>is_member</em> to the <a href="/bots/api#chatmember">ChatMember</a> object, which can be used to find whether a restricted user is a member of the chat.</li>
|
||||
<li>Added the field <em>forward_sender_name</em> to the <a href="/bots/api#message">Message</a> object, containing name of the sender who has opted to hide their account.</li>
|
||||
<li>Starting in July 2019, webhook requests from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
<li>Starting in July 2019, webhook requests from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks">https://core.telegram.org/bots/webhooks</a>.</li>
|
||||
<li>Document thumbnails now should be inscribed in a 320x320 square instead of 90x90.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-27-2018" href="#august-27-2018"><i class="anchor-icon"></i></a>August 27, 2018</h3>
|
||||
<h3><a class="anchor" href="#august-27-2018" id="august-27-2018" name="august-27-2018"><i class="anchor-icon"></i></a>August 27, 2018</h3>
|
||||
<p><strong>Bot API 4.1</strong></p>
|
||||
<ul>
|
||||
<li>Added support for translated versions of documents in <a href="/passport">Telegram Passport</a>.</li>
|
||||
<li>New field <em>translation</em> in <a href="/bots/api#encryptedpassportelement">EncryptedPassportElement</a>.</li>
|
||||
<li>New errors: <a href="/bots/api#passportelementerrortranslationfile">PassportElementErrorTranslationFile</a> and <a href="/bots/api#passportelementerrortranslationfile">PassportElementErrorTranslationFiles</a> and <a href="/bots/api#passportelementerrorunspecified">PassportElementErrorUnspecified</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-26-2018" href="#july-26-2018"><i class="anchor-icon"></i></a>July 26, 2018</h3>
|
||||
<h3><a class="anchor" href="#july-26-2018" id="july-26-2018" name="july-26-2018"><i class="anchor-icon"></i></a>July 26, 2018</h3>
|
||||
<p><strong>Bot API 4.0</strong>.</p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/passport"><strong>Telegram Passport</strong></a>. See the official announcement on the <a href="https://telegram.org/blog">blog</a> and the <a href="https://core.telegram.org/passport">manual</a> for details.</li>
|
||||
|
@ -361,35 +367,35 @@ To learn how to create…">
|
|||
<li>Added the field <a href="/bots/api#animation">animation</a> to the <a href="/bots/api#message">Message</a> object. For backward compatibility, when this field is set, the <em>document</em> field will be also set.</li>
|
||||
<li>Added two new <a href="/bots/api#messageentity">MessageEntity</a> types: <em>cashtag</em> and <em>phone_number</em>.</li>
|
||||
<li>Added support for Foursquare venues: added the new field <em>foursquare_type</em> to the objects <a href="/bots/api#venue">Venue</a>, <a href="/bots/api#inlinequeryresultvenue">InlineQueryResultVenue</a> and <a href="/bots/api#inputvenuemessagecontent">InputVenueMessageContent</a>, and the parameter <em>foursquare_type</em> to the <a href="/bots/api#sendvenue">sendVenue</a> method.</li>
|
||||
<li>You can now create inline mentions of users, who have pressed your bot's callback buttons.</li>
|
||||
<li>You can now create inline mentions of users, who have pressed your bot's callback buttons.</li>
|
||||
<li>You can now use the <code>Retry-After</code> response header to configure the delay after which the Bot API will retry the request after an unsuccessful response from a webhook.</li>
|
||||
<li>If a webhook returns the HTTP error <code>410 Gone</code> for all requests for more than 23 hours successively, it can be automatically removed.</li>
|
||||
<li>Added <a href="https://en.wikipedia.org/wiki/VCard">vCard</a> support when sharing contacts: added the field <em>vcard</em> to the objects <a href="/bots/api#contact">Contact</a>, <a href="/bots/api#inlinequeryresultcontact">InlineQueryResultContact</a>, <a href="/bots/api#inputcontactmessagecontent">InputContactMessageContent</a> and the method <a href="/bots/api#sendcontact">sendContact</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="february-13-2018" href="#february-13-2018"><i class="anchor-icon"></i></a>February 13, 2018</h3>
|
||||
<h3><a class="anchor" href="#february-13-2018" id="february-13-2018" name="february-13-2018"><i class="anchor-icon"></i></a>February 13, 2018</h3>
|
||||
<p><strong>Bot API 3.6</strong>.</p>
|
||||
<ul>
|
||||
<li>Supported <a href="https://core.telegram.org/bots/api#formatting-options">text formatting</a> in media captions. Specify the desired <em>parse_mode</em> (<a href="https://core.telegram.org/bots/api#markdown-style">Markdown</a> or <a href="https://core.telegram.org/bots/api#html-style">HTML</a>) when you provide a caption.</li>
|
||||
<li>In supergroups, if the bot receives a message that is a reply, it will also receive the message to which that message is replying – even if the original message is inaccessible due to the bot's privacy settings. (In other words, replying to any message in a supergroup with a message that mentions the bot or features a command for it acts as forwarding the original message to the bot). </li>
|
||||
<li>Added the new field <em>connected_website</em> to <a href="/bots/api#message">Message</a>. The bot will receive a message with this field in a private chat when a user logs in on the bot's connected website using the <a href="https://core.telegram.org/widgets/login">Login Widget</a> and allows sending messages from your bot.</li>
|
||||
<li>In supergroups, if the bot receives a message that is a reply, it will also receive the message to which that message is replying – even if the original message is inaccessible due to the bot's privacy settings. (In other words, replying to any message in a supergroup with a message that mentions the bot or features a command for it acts as forwarding the original message to the bot). </li>
|
||||
<li>Added the new field <em>connected_website</em> to <a href="/bots/api#message">Message</a>. The bot will receive a message with this field in a private chat when a user logs in on the bot's connected website using the <a href="https://core.telegram.org/widgets/login">Login Widget</a> and allows sending messages from your bot.</li>
|
||||
<li>Added the new parameter <em>supports_streaming</em> to the <a href="/bots/api#sendvideo">sendVideo</a> method and a field with the same name to the <a href="/bots/api#inputmediavideo">InputMediaVideo</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="november-17-2017" href="#november-17-2017"><i class="anchor-icon"></i></a>November 17, 2017</h3>
|
||||
<h3><a class="anchor" href="#november-17-2017" id="november-17-2017" name="november-17-2017"><i class="anchor-icon"></i></a>November 17, 2017</h3>
|
||||
<p><strong>Bot API 3.5</strong>.</p>
|
||||
<ul>
|
||||
<li>Added the new method <a href="/bots/api#sendmediagroup">sendMediaGroup</a> and two kinds of <a href="/bots/api#inputmedia">InputMedia</a> objects to support the new <a href="https://telegram.org/blog/albums-saved-messages">albums feature</a>.</li>
|
||||
<li>Added support for pinning messages in channels. <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a> accept channels.</li>
|
||||
<li>Added the new fields <em>provider_data</em>, <em>send_phone_number_to_provider</em>, <em>send_email_to_provider</em> to <a href="/bots/api#sendinvoice">sendInvoice</a> for sharing information about the invoice with the payment provider.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="october-11-2017" href="#october-11-2017"><i class="anchor-icon"></i></a>October 11, 2017</h3>
|
||||
<h3><a class="anchor" href="#october-11-2017" id="october-11-2017" name="october-11-2017"><i class="anchor-icon"></i></a>October 11, 2017</h3>
|
||||
<p><strong>Bot API 3.4</strong>.</p>
|
||||
<ul>
|
||||
<li>Bots can now send and receive <a href="https://telegram.org/blog/live-locations">Live Locations</a>. Added new field <em>live_period</em> to the <a href="/bots/api#sendlocation">sendLocation</a> method and the <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a> and <a href="/bots/api#stopmessagelivelocation">stopMessageLiveLocation</a> methods as well as the necessary objects for inline bots.</li>
|
||||
<li>Bots can use the new <a href="/bots/api#setchatstickerset">setChatStickerSet</a> and <a href="/bots/api#deletechatstickerset">deleteChatStickerSet</a> methods to manage <a href="https://telegram.org/blog#stickers-of-the-group">group sticker sets</a>.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the group's sticker set for supergroups if available.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the group's sticker set for supergroups if available.</li>
|
||||
<li>Bots now receive entities from media captions in the new field <em>caption_entities</em> in <a href="/bots/api#message">Message</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-23-2017" href="#august-23-2017"><i class="anchor-icon"></i></a>August 23, 2017</h3>
|
||||
<h3><a class="anchor" href="#august-23-2017" id="august-23-2017" name="august-23-2017"><i class="anchor-icon"></i></a>August 23, 2017</h3>
|
||||
<p><strong>Bot API 3.3</strong>.</p>
|
||||
<ul>
|
||||
<li>Bots can now mention users via <a href="/bots/api#formatting-options">inline mentions</a>, without using usernames.</li>
|
||||
|
@ -397,13 +403,13 @@ To learn how to create…">
|
|||
<li>Added the new fields <em>author_signature</em> and <em>forward_signature</em> to the <a href="/bots/api#message">Message</a> object.</li>
|
||||
<li>Added the new field <em>is_bot</em> to the <a href="/bots/api#user">User</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-21-2017" href="#july-21-2017"><i class="anchor-icon"></i></a>July 21, 2017</h3>
|
||||
<h3><a class="anchor" href="#july-21-2017" id="july-21-2017" name="july-21-2017"><i class="anchor-icon"></i></a>July 21, 2017</h3>
|
||||
<p><strong>Bot API 3.2</strong>. Teach your bot to handle <a href="/bots/api#stickers">stickers and sticker sets</a>.</p>
|
||||
<ul>
|
||||
<li>Added new methods for working with stickers: <a href="/bots/api#getstickerset">getStickerSet</a>, <a href="/bots/api#uploadstickerfile">uploadStickerFile</a>, <a href="/bots/api#createnewstickerset">createNewStickerSet</a>, <a href="/bots/api#addstickertoset">addStickerToSet</a>, <a href="/bots/api#setstickerpositioninset">setStickerPositionInSet</a>, and <a href="/bots/api#deletestickerfromset">deleteStickerFromSet</a>.</li>
|
||||
<li>Added the fields <em>set_name</em> and <em>mask_position</em> to the <a href="/bots/api#sticker">Sticker</a> object, plus two new objects, <a href="/bots/api#stickerset">StickerSet</a>, and <a href="/bots/api#maskposition">MaskPosition</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="june-30-2017" href="#june-30-2017"><i class="anchor-icon"></i></a>June 30, 2017</h3>
|
||||
<h3><a class="anchor" href="#june-30-2017" id="june-30-2017" name="june-30-2017"><i class="anchor-icon"></i></a>June 30, 2017</h3>
|
||||
<p><strong>Bot API 3.1</strong>. Build your own robotic police force for supergoups with these new methods for admin bots:</p>
|
||||
<ul>
|
||||
<li>Added new methods <a href="/bots/api#restrictchatmember">restrictChatMember</a> and <a href="/bots/api#promotechatmember">promoteChatMember</a> to manage users and admins, added new parameter <em>until_date</em> to <a href="/bots/api#kickchatmember">kickChatMember</a> for temporary bans.</li>
|
||||
|
@ -411,10 +417,10 @@ To learn how to create…">
|
|||
<li>Added the new fields <em>photo</em>, <em>description</em> and <em>invite_link</em> to the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added the new fields <em>until_date</em>, <em>can_be_edited</em>, <em>can_change_info</em>, <em>can_post_messages</em>, <em>can_edit_messages</em>, <em>can_delete_messages</em>, <em>can_invite_users</em>, <em>can_restrict_members</em>, <em>can_pin_messages</em>, <em>can_promote_members</em>, <em>can_send_messages</em>, <em>can_send_media_messages</em>, <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> to the <a href="/bots/api#chatmember">ChatMember</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-18-2017" href="#may-18-2017"><i class="anchor-icon"></i></a>May 18, 2017</h3>
|
||||
<h3><a class="anchor" href="#may-18-2017" id="may-18-2017" name="may-18-2017"><i class="anchor-icon"></i></a>May 18, 2017</h3>
|
||||
<p>Introducing <strong>Bot API 3.0</strong>.</p>
|
||||
<p><strong>NEW Payment Platform</strong></p>
|
||||
<p>See <a href="/bots/payments">Introduction to Bot Payments</a> for a brief overview. If you're not a developer, you may like <a href="https://telegram.org/blog/payments">this user-friendly blog post</a> better.</p>
|
||||
<p>See <a href="/bots/payments">Introduction to Bot Payments</a> for a brief overview. If you're not a developer, you may like <a href="https://telegram.org/blog/payments">this user-friendly blog post</a> better.</p>
|
||||
<ul>
|
||||
<li>Your bot can now accept <a href="/bots/api#payments">payments</a> for goods and services via Telegram. </li>
|
||||
<li>Added new kinds of <a href="/bots/api#update">updates</a>, <em>shipping_query</em> and <em>pre_checkout_query</em>, and new types of <a href="/bots/api#message">message</a> content, <em>invoice</em> and <em>successful_payment</em>.</li>
|
||||
|
@ -428,7 +434,7 @@ To learn how to create…">
|
|||
</ul>
|
||||
<p><strong>NEW Multilingual Bots</strong></p>
|
||||
<ul>
|
||||
<li>The <a href="/bots/api#user">User</a> object now may have a <em>language_code</em> field that contains the <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language.</li>
|
||||
<li>The <a href="/bots/api#user">User</a> object now may have a <em>language_code</em> field that contains the <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language.</li>
|
||||
<li>Thanks to this, your bot can now offer localized responses to users that speak different languages.</li>
|
||||
</ul>
|
||||
<p><strong>More power to admin bots</strong></p>
|
||||
|
@ -442,29 +448,44 @@ To learn how to create…">
|
|||
<li><a href="https://core.telegram.org/bots/api#inlinekeyboardbutton">Inline keyboards</a> with <em>switch_inline_query</em> and <em>switch_inline_query_current_chat</em> can no longer be sent to channels because they are useless there.</li>
|
||||
<li>New fields <em>gif_duration</em> in <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a> and <em>mpeg4_duration</em> in <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-4-2016" href="#december-4-2016"><i class="anchor-icon"></i></a>December 4, 2016</h3>
|
||||
<h3><a class="anchor" href="#december-4-2016" id="december-4-2016" name="december-4-2016"><i class="anchor-icon"></i></a>December 4, 2016</h3>
|
||||
<p>Introducing <strong>Bot API 2.3.1</strong>, a nifty little update that will give you more control over how your bot gets its updates.</p>
|
||||
<ul>
|
||||
<li>Use the new field <em>max_connections</em> in <a href="/bots/api#setwebhook">setWebhook</a> to optimize your bot's server load</li>
|
||||
<li>Use the new field <em>max_connections</em> in <a href="/bots/api#setwebhook">setWebhook</a> to optimize your bot's server load</li>
|
||||
<li>Use <em>allowed_updates</em> in <a href="/bots/api#setwebhook">setWebhook</a> and <a href="/bots/api#getupdates">getUpdates</a> to selectively subscribe to updates of a certain type. Among other things, this allows you to stop getting updates about new posts in channels where your bot is an admin.</li>
|
||||
<li><a href="/bots/api#deletewebhook">deleteWebhook</a> moved out of <a href="/bots/api#setwebhook">setWebhook</a> to get a whole separate method for itself.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="november-21-2016" href="#november-21-2016"><i class="anchor-icon"></i></a>November 21, 2016</h3>
|
||||
<h3><a class="anchor" href="#november-21-2016" id="november-21-2016" name="november-21-2016"><i class="anchor-icon"></i></a>November 21, 2016</h3>
|
||||
<p><strong>Bot API 2.3</strong></p>
|
||||
<ul>
|
||||
<li>Modified <a href="/bots/faq#what-messages-will-my-bot-get"><strong>bot privacy mode</strong></a> for the sake of consistency. </li>
|
||||
<li><p>Your bot can now get <strong>updates about posts in channels</strong>. Added new fields <em>channel_post</em> and <em>edited_channel_post</em> to <a href="/bots/#update">Update</a>.</p>
|
||||
<li>
|
||||
<p>Modified <a href="/bots/faq#what-messages-will-my-bot-get"><strong>bot privacy mode</strong></a> for the sake of consistency. </p>
|
||||
</li>
|
||||
<li><p>You can now update high scores to a lower value by using the new <em>force</em> parameter in <a href="/bots/#setgamescore">setGameScore</a>. Handy for punishing <strong>cheaters</strong> or fixing errors in your game's High Score table.</p>
|
||||
<li>
|
||||
<p>Your bot can now get <strong>updates about posts in channels</strong>. Added new fields <em>channel_post</em> and <em>edited_channel_post</em> to <a href="/bots/#update">Update</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>You can now update high scores to a lower value by using the new <em>force</em> parameter in <a href="/bots/#setgamescore">setGameScore</a>. Handy for punishing <strong>cheaters</strong> or fixing errors in your game's High Score table.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Starting today, messages with high scores will be updated with new high scores by default. Use <em>disable_edit_message</em> in <a href="/bots/#setgamescore">setGameScore</a> if you don't want this.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The <em>edit_message</em> parameter from <a href="/bots/#setgamescore">setGameScore</a> is no longer in use. For backward compatibility, it will be taken into account for a while, unless <em>disable_edit_message</em> is passed explicitly.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added the new field <em>forward_from_message_id</em> to <a href="/bots/#message">Message</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added the new parameter <em>cache_time</em> to <a href="/bots/#answercallbackquery">answerCallbackQuery</a>. Will eventually work in Telegram apps — somewhere after version 3.14, maybe 3.15.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Renamed <em>hide_keyboard</em> to <em>remove_keyboard</em> in <a href="/bots/#replykeyboardremove">ReplyKeyboardRemove</a> for clarity. <em>hide_keyboard</em> will still work for a while for backward compatibility.</p>
|
||||
</li>
|
||||
<li>Starting today, messages with high scores will be updated with new high scores by default. Use <em>disable_edit_message</em> in <a href="/bots/#setgamescore">setGameScore</a> if you don't want this.</li>
|
||||
<li>The <em>edit_message</em> parameter from <a href="/bots/#setgamescore">setGameScore</a> is no longer in use. For backward compatibility, it will be taken into account for a while, unless <em>disable_edit_message</em> is passed explicitly.</li>
|
||||
<li>Added the new field <em>forward_from_message_id</em> to <a href="/bots/#message">Message</a>.</li>
|
||||
<li>Added the new parameter <em>cache_time</em> to <a href="/bots/#answercallbackquery">answerCallbackQuery</a>. Will eventually work in Telegram apps — somewhere after version 3.14, maybe 3.15.</li>
|
||||
<li>Renamed <em>hide_keyboard</em> to <em>remove_keyboard</em> in <a href="/bots/#replykeyboardremove">ReplyKeyboardRemove</a> for clarity. <em>hide_keyboard</em> will still work for a while for backward compatibility.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="october-3-2016" href="#october-3-2016"><i class="anchor-icon"></i></a>October 3, 2016</h3>
|
||||
<p><strong>Bot API 2.2.</strong> <a href="/bots/games">Introducing a new Gaming Platform!</a> See <a href="/bots/games">this introduction</a> for a brief overview.<br>If you're not a developer, you may like <a href="https://telegram.org/blog/games"><strong>this user-friendly blog post</strong></a> better.</p>
|
||||
<h3><a class="anchor" href="#october-3-2016" id="october-3-2016" name="october-3-2016"><i class="anchor-icon"></i></a>October 3, 2016</h3>
|
||||
<p><strong>Bot API 2.2.</strong> <a href="/bots/games">Introducing a new Gaming Platform!</a> See <a href="/bots/games">this introduction</a> for a brief overview.
|
||||
If you're not a developer, you may like <a href="https://telegram.org/blog/games"><strong>this user-friendly blog post</strong></a> better.</p>
|
||||
<ul>
|
||||
<li>New tools for building <a href="/bots/api#games"><strong>HTML5 games</strong></a>.</li>
|
||||
<li>New method <a href="/bots/api#sendgame">sendGame</a>, new object <a href="/bots/api#inlinequeryresultgame">InlineQueryResultGame</a>, new field <em>game</em> in <a href="/bots/api#message">Message</a>.</li>
|
||||
|
@ -474,40 +495,50 @@ To learn how to create…">
|
|||
</ul>
|
||||
<p><strong>Other changes</strong></p>
|
||||
<ul>
|
||||
<li>Making life easier for webhook users. Added a detailed <a href="https://core.telegram.org/bots/webhooks"><strong>Guide to All Things Webhook</strong></a> that describes every pothole you can run into on the webhook road.</li>
|
||||
<li><p>New method <a href="/bots/api#getwebhookinfo">getWebhookInfo</a> to check current webhook status.</p>
|
||||
<li>
|
||||
<p>Making life easier for webhook users. Added a detailed <a href="https://core.telegram.org/bots/webhooks"><strong>Guide to All Things Webhook</strong></a> that describes every pothole you can run into on the webhook road.</p>
|
||||
</li>
|
||||
<li><p>Added the option to specify an <strong>HTTP URL</strong> for a file in all methods where <a href="/bots/api#inputfile">InputFile</a> or <em>file_id</em> can be used (except voice messages). Telegram will get the file from the specified URL and send it to the user. Files must be smaller than 5 MB for photos and smaller than 20 MB for all other types of content.</p>
|
||||
<li>
|
||||
<p>New method <a href="/bots/api#getwebhookinfo">getWebhookInfo</a> to check current webhook status.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added the option to specify an <strong>HTTP URL</strong> for a file in all methods where <a href="/bots/api#inputfile">InputFile</a> or <em>file_id</em> can be used (except voice messages). Telegram will get the file from the specified URL and send it to the user. Files must be smaller than 5 MB for photos and smaller than 20 MB for all other types of content.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use the new <em>url</em> parameter in <a href="/bots/api#answercallbackquery">answerCallbackQuery</a> to create buttons that open your bot with user-specific parameters.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added new field <em>switch_inline_query_current_chat</em> in <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added <em>caption</em> fields to <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#inlinequeryresultaudio">InlineQueryResultAudio</a>, <a href="/bots/api#inlinequeryresultvoice">InlineQueryResultVoice</a>, <a href="/bots/api#inlinequeryresultcachedaudio">InlineQueryResultCachedAudio</a>, and <a href="/bots/api#inlinequeryresultcachedvoice">InlineQueryResultCachedVoice</a>.</p>
|
||||
</li>
|
||||
<li>Use the new <em>url</em> parameter in <a href="/bots/api#answercallbackquery">answerCallbackQuery</a> to create buttons that open your bot with user-specific parameters.</li>
|
||||
<li>Added new field <em>switch_inline_query_current_chat</em> in <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added <em>caption</em> fields to <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#inlinequeryresultaudio">InlineQueryResultAudio</a>, <a href="/bots/api#inlinequeryresultvoice">InlineQueryResultVoice</a>, <a href="/bots/api#inlinequeryresultcachedaudio">InlineQueryResultCachedAudio</a>, and <a href="/bots/api#inlinequeryresultcachedvoice">InlineQueryResultCachedVoice</a>.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>New field <em>all_members_are_administrators</em> in the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Certain server responses may now contain the new <a href="/bots/api#responseparameters"><em>parameters</em></a> field with expanded info on errors that occurred while processing your requests.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-25-2016" href="#may-25-2016"><i class="anchor-icon"></i></a>May 25, 2016</h3>
|
||||
<h3><a class="anchor" href="#may-25-2016" id="may-25-2016" name="may-25-2016"><i class="anchor-icon"></i></a>May 25, 2016</h3>
|
||||
<ul>
|
||||
<li><a href="/bots/api#inlinekeyboardmarkup">Inline keyboards</a> may now be used in group chats. Channels coming soon.</li>
|
||||
<li>Check out <a href="https://telegram.me/vote">@vote</a> and <a href="https://telegram.me/like">@like</a> for examples.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-22-2016" href="#may-22-2016"><i class="anchor-icon"></i></a>May 22, 2016</h3>
|
||||
<h3><a class="anchor" href="#may-22-2016" id="may-22-2016" name="may-22-2016"><i class="anchor-icon"></i></a>May 22, 2016</h3>
|
||||
<ul>
|
||||
<li><strong>Bot API 2.1.</strong> Added more tools for group administrator bots. Your bot can now get a list of administrators and members count in a group, check a user's current status (administrator, creator, left the group, kicked from the group), and leave a group.</li>
|
||||
<li><strong>Bot API 2.1.</strong> Added more tools for group administrator bots. Your bot can now get a list of administrators and members count in a group, check a user's current status (administrator, creator, left the group, kicked from the group), and leave a group.</li>
|
||||
<li>Added new methods: <a href="/bots/api#getchat">getChat</a>, <a href="/bots/api#leavechat">leaveChat</a>, <a href="/bots/api#getchatadministrators">getChatAdministrators</a>, <a href="/bots/api#getchatmember">getChatMember</a>, <a href="/bots/api#getchatmemberscount">getChatMembersCount</a>.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/edit">edited messages</a> and <a href="https://telegram.org/blog/edit#new-mentions">new mentions</a> from Telegram v.3.9. New fields: <em>edited_message</em> in <a href="/bots/api#update">Update</a>, <em>edit_date</em> in <a href="/bots/api#message">Message</a>, <em>user</em> in <a href="/bots/api#messageentity">MessageEntity</a>. New value <em>text_mention</em> for the <em>type</em> field in <a href="/bots/api#messageentity">MessageEntity</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-12-2016" href="#may-12-2016"><i class="anchor-icon"></i></a>May 12, 2016</h3>
|
||||
<h3><a class="anchor" href="#may-12-2016" id="may-12-2016" name="may-12-2016"><i class="anchor-icon"></i></a>May 12, 2016</h3>
|
||||
<ul>
|
||||
<li>Added consistency to what messages bots get in groups and supergroups. <a href="/bots/faq#what-messages-will-my-bot-get">See updated FAQ for details »</a></li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-6-2016" href="#may-6-2016"><i class="anchor-icon"></i></a>May 6, 2016</h3>
|
||||
<h3><a class="anchor" href="#may-6-2016" id="may-6-2016" name="may-6-2016"><i class="anchor-icon"></i></a>May 6, 2016</h3>
|
||||
<ul>
|
||||
<li>Added the field <em>emoji</em> to the <a href="/bots/api#sticker">Sticker</a> object. Your bot can now know the emoji a sticker corresponds to.</li>
|
||||
<li>Added the field <em>forward_from_chat</em> to the <a href="/bots/api#message">Message</a> object for messages forwarded from channels.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="april-9-2016" href="#april-9-2016"><i class="anchor-icon"></i></a>April 9, 2016</h3>
|
||||
<h3><a class="anchor" href="#april-9-2016" id="april-9-2016" name="april-9-2016"><i class="anchor-icon"></i></a>April 9, 2016</h3>
|
||||
<p>Introducing <strong>Bot API 2.0</strong>. Check out <a href="/bots/2-0-intro">this page</a> for a review of this major update.</p>
|
||||
<ul>
|
||||
<li>New <a href="/bots/2-0-intro#new-inline-keyboards"><strong>inline keyboards</strong></a> with <strong>callback</strong> and <strong>URL buttons</strong>. Added new objects <a href="/bots/api#inlinekeyboardmarkup">InlineKeyboardMarkup</a>, <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a> and <a href="/bots/api#callbackquery">CallbackQuery</a>, added <em>reply_markup</em> fields to all <a href="/bots/api#inlinequeryresult">InlineQueryResult</a> objects. Added field <em>callback_query</em> to the <a href="/bots/api#update">Update</a> object, new method <a href="/bots/api#answercallbackquery">answerCallbackQuery</a>.</li>
|
||||
|
@ -527,71 +558,70 @@ To learn how to create…">
|
|||
<li>Added fields <em>venue</em>, <em>pinned_message</em> and <em>entities</em> to the <a href="/bots/api#message">Message</a> object. Added new objects <a href="/bots/api#messageentity">MessageEntity</a> and <a href="/bots/api#venue">Venue</a>, new methods <a href="/bots/api#sendvenue">sendVenue</a> and <a href="/bots/api#sendcontact">sendContact</a>.</li>
|
||||
<li>Renamed the fields <em>new_chat_participant</em> and <em>left_chat_participant</em> of the <a href="/bots/api#message">Message</a> object to <em>new_chat_member</em> and <em>left_chat_member</em>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="february-20-2016" href="#february-20-2016"><i class="anchor-icon"></i></a>February 20, 2016</h3>
|
||||
<h3><a class="anchor" href="#february-20-2016" id="february-20-2016" name="february-20-2016"><i class="anchor-icon"></i></a>February 20, 2016</h3>
|
||||
<ul>
|
||||
<li>Added the <em>disable_notification</em> parameter to all methods that send messages or any kind.</li>
|
||||
<li>Removed backward compatibility from the method <a href="/bots/api#sendaudio">sendAudio</a>. Voice messages now must be sent using the method <a href="/bots/api#sendvoice">sendVoice</a>. There is no more need to specify a non-empty title or performer while sending the audio by <em>file_id</em>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-20-2016" href="#january-20-2016"><i class="anchor-icon"></i></a>January 20, 2016</h3>
|
||||
<h3><a class="anchor" href="#january-20-2016" id="january-20-2016" name="january-20-2016"><i class="anchor-icon"></i></a>January 20, 2016</h3>
|
||||
<ul>
|
||||
<li>By the way, you can use both HTML-style and markdown-style formatting in your bot's messages to send bold, italic or fixed-width text and inline links. All official Telegram clients support this. See <a href="/bots/api#formatting-options">Formatting options</a> for details.</li>
|
||||
<li>By the way, you can use both HTML-style and markdown-style formatting in your bot's messages to send bold, italic or fixed-width text and inline links. All official Telegram clients support this. See <a href="/bots/api#formatting-options">Formatting options</a> for details.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-14-2016" href="#january-14-2016"><i class="anchor-icon"></i></a>January 14, 2016</h3>
|
||||
<h3><a class="anchor" href="#january-14-2016" id="january-14-2016" name="january-14-2016"><i class="anchor-icon"></i></a>January 14, 2016</h3>
|
||||
<ul>
|
||||
<li>You can now <a href="/bots/inline#collecting-feedback">collect feedback</a> on which results provided by your inline bot get chosen by the users. Added the <code>setinlinefeedback</code> command for Botfather, new type <a href="/bots/api#choseninlineresult">ChosenInlineResult</a>, new field <em>chosen_inline_result</em> to the <a href="/bots/api#update">Update</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-4-2016" href="#january-4-2016"><i class="anchor-icon"></i></a>January 4, 2016</h3>
|
||||
<h3><a class="anchor" href="#january-4-2016" id="january-4-2016" name="january-4-2016"><i class="anchor-icon"></i></a>January 4, 2016</h3>
|
||||
<ul>
|
||||
<li>Added support for <a href="/bots/inline">Inline Mode</a>, a new way for people to contact your bot by typing its username and a query in the text input field in any chat. Enable by sending <code>/setinline</code> to <a href="https://telegram.me/botfather">@BotFather</a>.</li>
|
||||
<li>New optional field <em>inline_query</em> added to the <a href="/bots/api#update">Update</a> object.</li>
|
||||
<li>Added new method <a href="/bots/api#answerinlinequery">answerInlineQuery</a> and new objects <a href="/bots/api#inlinequery">InlineQuery</a>, <a href="/bots/api#inlinequeryresultarticle">InlineQueryResultArticle</a>, <a href="/bots/api#inlinequeryresultphoto">InlineQueryResultPhoto</a>, <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a>, <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a> and <a href="/bots/api#inlinequeryresultvideo">InlineQueryResultVideo</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="november-2015" href="#november-2015"><i class="anchor-icon"></i></a>November, 2015</h3>
|
||||
<h3><a class="anchor" href="#november-2015" id="november-2015" name="november-2015"><i class="anchor-icon"></i></a>November, 2015</h3>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/supergroups">supergroups</a>. The <em>Type</em> field in the <a href="/bots/api#chat">Chat</a> object can now contain 'supergroup'.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/supergroups">supergroups</a>. The <em>Type</em> field in the <a href="/bots/api#chat">Chat</a> object can now contain 'supergroup'.</li>
|
||||
<li>New optional fields added to the <a href="/bots/api#message">Message</a> object: <em>supergroup_chat_created</em>, <em>migrate_to_chat_id</em>, <em>migrate_from_chat_id</em> and <em>channel_chat_created</em>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="october-8-2015" href="#october-8-2015"><i class="anchor-icon"></i></a>October 8, 2015</h3>
|
||||
<h3><a class="anchor" href="#october-8-2015" id="october-8-2015" name="october-8-2015"><i class="anchor-icon"></i></a>October 8, 2015</h3>
|
||||
<ul>
|
||||
<li>Added initial channel support for bots (no Telegram clients support this at the moment, please wait for updates):</li>
|
||||
<li>The <em>Chat</em> field in the <a href="/bots/api#message">Message</a> is now of the new type <a href="/bots/api#chat">Chat</a>.</li>
|
||||
<li>You can now pass a channel username (in the format <code>@channelusername</code>) in the place of <em>chat_id</em> in all methods (and instead of <em>from_chat_id</em> in <a href="/bots/api#forwardmessage">forwardMessage</a>). For this to work, the bot must be an administrator in the channel (and that's exactly what Telegram clients don't support yet — adding bots as administrators coming soon).</li>
|
||||
<li>You can now pass a channel username (in the format <code>@channelusername</code>) in the place of <em>chat_id</em> in all methods (and instead of <em>from_chat_id</em> in <a href="/bots/api#forwardmessage">forwardMessage</a>). For this to work, the bot must be an administrator in the channel (and that's exactly what Telegram clients don't support yet — adding bots as administrators coming soon).</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="september-18-2015" href="#september-18-2015"><i class="anchor-icon"></i></a>September 18, 2015</h3>
|
||||
<h3><a class="anchor" href="#september-18-2015" id="september-18-2015" name="september-18-2015"><i class="anchor-icon"></i></a>September 18, 2015</h3>
|
||||
<ul>
|
||||
<li>Bots can now download files and media sent by users.</li>
|
||||
<li>Added <a href="/bots/api#getfile">getFile</a> and <a href="/bots/api#file">File</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="september-7-2015" href="#september-7-2015"><i class="anchor-icon"></i></a>September 7, 2015</h3>
|
||||
<h3><a class="anchor" href="#september-7-2015" id="september-7-2015" name="september-7-2015"><i class="anchor-icon"></i></a>September 7, 2015</h3>
|
||||
<ul>
|
||||
<li>You can now <a href="/bots/api#making-requests">pass parameters</a> using <em>application/json</em> (please note that this doesn't work for file uploads: use <em>multipart/form-data</em> to upload files).</li>
|
||||
<li>You can now <a href="/bots/api#making-requests">pass parameters</a> using <em>application/json</em> (please note that this doesn't work for file uploads: use <em>multipart/form-data</em> to upload files).</li>
|
||||
<li>Added very basic <a href="/bots/api#using-markdown">markdown support</a>. New field <em>parse_mode</em> added to <a href="/bots/api#sendmessage">sendMessage</a>. For the moment messages with markdown will be displayed correctly only in Telegram for <strong>Android</strong>. Other official apps will catch up soon.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-29-2015" href="#august-29-2015"><i class="anchor-icon"></i></a>August 29, 2015</h3>
|
||||
<h3><a class="anchor" href="#august-29-2015" id="august-29-2015" name="august-29-2015"><i class="anchor-icon"></i></a>August 29, 2015</h3>
|
||||
<ul>
|
||||
<li>Added support for self-signed certificates: upload your certificate using the <em>certificate</em> parameter in the <a href="/bots/api#setwebhook">setWebhook</a> method.</li>
|
||||
<li>You can now make <a href="/bots/api#making-requests-when-getting-updates">new requests</a> when responding to webhook updates.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-15-2015" href="#august-15-2015"><i class="anchor-icon"></i></a>August 15, 2015</h3>
|
||||
<h3><a class="anchor" href="#august-15-2015" id="august-15-2015" name="august-15-2015"><i class="anchor-icon"></i></a>August 15, 2015</h3>
|
||||
<ul>
|
||||
<li>Added new type <strong><a href="/bots/api#voice">Voice</a></strong> and new method <a href="/bots/api#sendvoice"><strong>sendVoice</strong></a> for sending voice messages.</li>
|
||||
<li>Earlier <strong><a href="/bots/api#audio">Audio</a></strong> and <strong><a href="/bots/api#sendaudio">sendAudio</a></strong> should now be used for sending music files. Telegram clients will show such files in the in-app music player. If you were using <a href="/bots/api#sendaudio"><strong>sendAudio</strong></a> for your bot to send voice messages, please use <a href="/bots/api#sendaudio"><strong>sendVoice</strong></a> instead.</li>
|
||||
<li>Added optional fields <em>performer</em>, <em>title</em> to the <a href="/bots/api#audio"><strong>Audio</strong></a> object and <a href="/bots/api#sendaudio"><strong>sendAudio</strong></a> method.</li>
|
||||
<li>Added optional field <em>voice</em> to the <a href="/bots/api#message"><strong>Message</strong></a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-2015" href="#july-2015"><i class="anchor-icon"></i></a>July 2015</h3>
|
||||
<h3><a class="anchor" href="#july-2015" id="july-2015" name="july-2015"><i class="anchor-icon"></i></a>July 2015</h3>
|
||||
<ul>
|
||||
<li>The <strong>thumb</strong> field is now optional for <a href="/bots/api#video">Video</a>, <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#document">Document</a> objects</li>
|
||||
<li>The API now supports both video and photo captions. The <strong>caption</strong> field has been removed from the <a href="/bots/api#video">Video</a> object and added to the <a href="/bots/api#message">Message</a> object instead. </li>
|
||||
<li><strong>caption</strong> and <strong>duration</strong> optional fields have been added to the <a href="/bots/api#sendvideo">sendVideo</a> method.</li>
|
||||
<li>Fixed typo: <strong>user_id</strong> in the Contact object is now correctly labeled as Integer, not String</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="june-24-2015" href="#june-24-2015"><i class="anchor-icon"></i></a>June 24, 2015</h3>
|
||||
<h3><a class="anchor" href="#june-24-2015" id="june-24-2015" name="june-24-2015"><i class="anchor-icon"></i></a>June 24, 2015</h3>
|
||||
<p>The bot platform was <a href="https://telegram.org/blog/bot-revolution">officially launched</a>.</p>
|
||||
<blockquote>
|
||||
<p><strong><a href="/bots/api">Back to the Bot API Manual »</a></strong></p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</blockquote></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -44,66 +44,65 @@
|
|||
<div class="dev_side_image">
|
||||
<a href="/file/811140221/1/fW9vnLya4Fg/e2b5c530c7b0e019c4" target="_blank"><img src="/file/811140530/1/h-eMmPp2vp4/cd4a109f75e6561305" title="Inline bots. Click for hi-res picture">
|
||||
</a></div>
|
||||
|
||||
<p>Beyond sending commands in private messages or groups, users can interact with your bot via <a href="/bots/api#inline-mode"><strong>inline queries</strong></a>. If inline queries are enabled, users can call your bot by typing its username and a query in the <strong>text input field</strong> in <strong>any</strong> chat. The query is sent to your bot in an update. This way, people can request content from your bot in <strong>any</strong> of their chats, groups, or channels without sending any messages at all.</p>
|
||||
<div><center>
|
||||
<a href="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458" target="_blank"><img src="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458" title="Users can type the bot’s username in any chat, then type a query without sending any messages" style="width:300px; padding:10px 0px 10px"/></a></center>
|
||||
<a href="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458" target="_blank"><img src="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458" title="Users can type the bot’s username in any chat, then type a query without sending any messages" style="width:300px; padding:10px 0px 10px"></a></center>
|
||||
<br></div>
|
||||
|
||||
|
||||
<p>To enable this option, send the <code>/setinline</code> command to <a href="https://telegram.me/botfather">@BotFather</a> and provide the placeholder text that the user will see in the input field after typing your bot’s name.</p>
|
||||
<blockquote>
|
||||
<p>See the <a href="/bots/api#inline-mode">Bot API Manual</a> for the relevant methods and objects.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="inline-results" href="#inline-results"><i class="anchor-icon"></i></a>Inline results</h3>
|
||||
<h3><a class="anchor" href="#inline-results" id="inline-results" name="inline-results"><i class="anchor-icon"></i></a>Inline results</h3>
|
||||
<p>Inline bots support <strong>all types of content</strong> available in Telegram (20 in all). They are capable of sending stickers, videos, music, locations, documents and more. </p>
|
||||
<div><center>
|
||||
<a href="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229" target="_blank"><img src="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229" title="All kinds of inline content" style="width: 295px; padding: 10px 20px;" /></a></center><br>
|
||||
<a href="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229" target="_blank"><img src="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229" title="All kinds of inline content" style="width: 295px; padding: 10px 20px;"></a></center><br>
|
||||
</div>
|
||||
|
||||
<p>Clients can display the results with vertical or horizontal scrolling, depending on the type of content:</p>
|
||||
<div><center>
|
||||
|
||||
<a href="/file/811140049/2/M2mzqjZoiUw/2d872f0df2aed182d6" target="_blank"><img src="/file/811140049/2/M2mzqjZoiUw/2d872f0df2aed182d6" title="Vertical scrolling" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
|
||||
<a href="/file/811140592/2/P4-tFhmBsCg/57418af08f1a252d45" target="_blank"><img src="/file/811140592/2/P4-tFhmBsCg/57418af08f1a252d45" title="Horizontal scrolling" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
|
||||
<pre><code><a href="/file/811140049/2/M2mzqjZoiUw/2d872f0df2aed182d6" target="_blank"><img src="/file/811140049/2/M2mzqjZoiUw/2d872f0df2aed182d6" title="Vertical scrolling" style="width: 295px; padding: 0px 20px;" /></a></code></pre>
|
||||
<p><a href="/file/811140592/2/P4-tFhmBsCg/57418af08f1a252d45" target="_blank"><img src="/file/811140592/2/P4-tFhmBsCg/57418af08f1a252d45" title="Horizontal scrolling" style="width: 295px; padding: 0px 20px;"></a></p>
|
||||
</center>
|
||||
<br></div>
|
||||
|
||||
<p>As soon as the user taps on an item, it's immediately sent to the recipient, and the input field is cleared.</p>
|
||||
<h3><a class="anchor" name="switching-inline-pm-modes" href="#switching-inline-pm-modes"><i class="anchor-icon"></i></a>Switching inline/PM modes</h3>
|
||||
<p>Some inline bots can benefit from an initial setup process, like connecting them to an account on an external service (e.g., YouTube). We've added an easy way of switching between the private chat with a bot and whatever chat the user wants to share inline results in.</p>
|
||||
<p>As soon as the user taps on an item, it's immediately sent to the recipient, and the input field is cleared.</p>
|
||||
<h3><a class="anchor" href="#switching-inlinepm-modes" id="switching-inlinepm-modes" name="switching-inlinepm-modes"><i class="anchor-icon"></i></a>Switching inline/PM modes</h3>
|
||||
<p>Some inline bots can benefit from an initial setup process, like connecting them to an account on an external service (e.g., YouTube). We've added an easy way of switching between the private chat with a bot and whatever chat the user wants to share inline results in.</p>
|
||||
<div><center>
|
||||
<a href="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12" target="_blank"><img src="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12" title="Switch to PM button" style="width: 295px; padding: 10px 20px;" /></a></center><br>
|
||||
<a href="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12" target="_blank"><img src="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12" title="Switch to PM button" style="width: 295px; padding: 10px 20px;"></a></center><br>
|
||||
</div>
|
||||
|
||||
<p>You can display a special ‘Switch to PM’ button above the inline results (or instead of them). This button will open a private chat with the bot and pass a parameter of your choosing, so that you can prompt the user for the relevant setup actions. Once done, you can use an inline keyboard with a <a href="/bots/api#inlinekeyboardmarkup"><em>switch_inline_query</em></a> button to send the user back to the original chat. </p>
|
||||
<p><strong>Sample bots</strong><br><a href="https://telegram.me/youtube">@youtube</a> – Shows a ‘Sign in to YouTube’ button, then suggests personalized results.</p>
|
||||
<p>You can display a special 'Switch to PM' button above the inline results (or instead of them). This button will open a private chat with the bot and pass a parameter of your choosing, so that you can prompt the user for the relevant setup actions. Once done, you can use an inline keyboard with a <a href="/bots/api#inlinekeyboardmarkup"><em>switch_inline_query</em></a> button to send the user back to the original chat. </p>
|
||||
<p><strong>Sample bots</strong>
|
||||
<a href="https://telegram.me/youtube">@youtube</a> – Shows a 'Sign in to YouTube' button, then suggests personalized results.</p>
|
||||
<blockquote>
|
||||
<p><a href="/bots/api#answerinlinequery">Manual: Switch to PM</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="location-based-results" href="#location-based-results"><i class="anchor-icon"></i></a>Location-based results</h3>
|
||||
<h3><a class="anchor" href="#location-based-results" id="location-based-results" name="location-based-results"><i class="anchor-icon"></i></a>Location-based results</h3>
|
||||
<p>Inline bots can request location data from their users. Use the <code>/setinlinegeo</code> command with <a href="https://telegram.me/botfather">@BotFather</a> to enable this. Your bot will ask the user for permission to access their location whenever they send an inline request.</p>
|
||||
<p><strong>Sample bot</strong><br><a href="https://telegram.me/foursquare">@foursquare</a> – This bot will ask for permission to access the user's location, then provide geo-targeted results.</p>
|
||||
<h3><a class="anchor" name="spreading-virally" href="#spreading-virally"><i class="anchor-icon"></i></a>Spreading virally</h3>
|
||||
<p>Messages sent with the help of your bot will show its username next to the sender's name.</p>
|
||||
<p><strong>Sample bot</strong>
|
||||
<a href="https://telegram.me/foursquare">@foursquare</a> – This bot will ask for permission to access the user's location, then provide geo-targeted results.</p>
|
||||
<h3><a class="anchor" href="#spreading-virally" id="spreading-virally" name="spreading-virally"><i class="anchor-icon"></i></a>Spreading virally</h3>
|
||||
<p>Messages sent with the help of your bot will show its username next to the sender's name.</p>
|
||||
<div><center>
|
||||
|
||||
<a href="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace" target="_blank"><img src="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace" title="Gif shared via a bot" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
<a href="/file/811140016/2/2b_B7nq9OQA/161b06d38843930fe5" target="_blank"><img src="/file/811140016/2/2b_B7nq9OQA/161b06d38843930fe5" title="Inline bot suggestions" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
|
||||
|
||||
<br><br></center></div>
|
||||
|
||||
<pre><code><a href="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace" target="_blank"><img src="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace" title="Gif shared via a bot" style="width: 295px; padding: 0px 20px;" /></a></code></pre>
|
||||
<p><a href="/file/811140016/2/2b_B7nq9OQA/161b06d38843930fe5" target="_blank"><img src="/file/811140016/2/2b_B7nq9OQA/161b06d38843930fe5" title="Inline bot suggestions" style="width: 295px; padding: 0px 20px;"></a></p>
|
||||
<p><br><br></p></center></div>
|
||||
<p>When a user taps on the bot username in the message header, the mention is automatically inserted into the input field. Entering the <code>@</code> symbol in the input field brings up a list of suggestions, featuring recently used inline bots.</p>
|
||||
<h4><a class="anchor" name="collecting-feedback" href="#collecting-feedback"><i class="anchor-icon"></i></a>Collecting feedback</h4>
|
||||
<h4><a class="anchor" href="#collecting-feedback" id="collecting-feedback" name="collecting-feedback"><i class="anchor-icon"></i></a>Collecting feedback</h4>
|
||||
<p>To know which of the provided results your users are sending to their chat partners, send <a href="https://telegram.me/botfather">@Botfather</a> the <code>/setinlinefeedback</code> command. With this enabled, you will receive updates on the results chosen by your users.</p>
|
||||
<p>Please note that this can create load issues for popular bots – you may receive more results than actual requests due to caching (see the <em>cache_time</em> parameter in <a href="/bots/api#answerinlinequery">answerInlineQuery</a>). For these cases, we recommend adjusting the probability setting to receive 1/10, 1/100 or 1/1000 of the results.</p>
|
||||
<h3><a class="anchor" name="inline-bot-samples" href="#inline-bot-samples"><i class="anchor-icon"></i></a>Inline bot samples</h3>
|
||||
<p>Here are some sample inline bots, in case you’re curious to see one in action. Try any of these:<br><a href="https://telegram.me/gif">@gif</a> – GIF search<br><a href="https://telegram.me/vid">@vid</a> – Video search<br><a href="https://telegram.me/pic">@pic</a> – Yandex image search<br><a href="https://telegram.me/bing">@bing</a> – Bing image search<br><a href="https://telegram.me/wiki">@wiki</a> – Wikipedia search<br><a href="https://telegram.me/imdb">@imdb</a> – IMDB search<br><a href="https://telegram.me/bold">@bold</a> – Make bold, italic or fixed sys text</p>
|
||||
<p><strong>NEW</strong><br><a href="https://telegram.me/youtube">@youtube</a> - Connect your account for personalized results<br><a href="https://telegram.me/music">@music</a> - Search and send classical music<br><a href="https://telegram.me/foursquare">@foursquare</a> – Find and send venue addresses<br><a href="https://telegram.me/sticker">@sticker</a> – Find and send stickers based on emoji</p>
|
||||
</div>
|
||||
<h3><a class="anchor" href="#inline-bot-samples" id="inline-bot-samples" name="inline-bot-samples"><i class="anchor-icon"></i></a>Inline bot samples</h3>
|
||||
<p>Here are some sample inline bots, in case you’re curious to see one in action. Try any of these:
|
||||
<a href="https://telegram.me/gif">@gif</a> – GIF search
|
||||
<a href="https://telegram.me/vid">@vid</a> – Video search
|
||||
<a href="https://telegram.me/pic">@pic</a> – Yandex image search
|
||||
<a href="https://telegram.me/bing">@bing</a> – Bing image search
|
||||
<a href="https://telegram.me/wiki">@wiki</a> – Wikipedia search
|
||||
<a href="https://telegram.me/imdb">@imdb</a> – IMDB search
|
||||
<a href="https://telegram.me/bold">@bold</a> – Make bold, italic or fixed sys text</p>
|
||||
<p><strong>NEW</strong>
|
||||
<a href="https://telegram.me/youtube">@youtube</a> - Connect your account for personalized results
|
||||
<a href="https://telegram.me/music">@music</a> - Search and send classical music
|
||||
<a href="https://telegram.me/foursquare">@foursquare</a> – Find and send venue addresses
|
||||
<a href="https://telegram.me/sticker">@sticker</a> – Find and send stickers based on emoji</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>channelFull</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Full info about a channel/supergroup">
|
||||
<meta property="description" content="Full info about a channel, supergroup or gigagroup.">
|
||||
<meta property="og:title" content="channelFull">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Full info about a channel/supergroup">
|
||||
<meta property="og:description" content="Full info about a channel, supergroup or gigagroup.">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelFull" >channelFull</a></li></ul></div>
|
||||
<h1 id="dev_page_title">channelFull</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Full info about a <a href="/api/channel">channel/supergroup</a></p>
|
||||
<div id="dev_page_content"><p>Full info about a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a> or <a href="/api/channel#gigagroups">gigagroup</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>chatFull</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Detailed chat info">
|
||||
<meta property="description" content="Full info about a legacy group.">
|
||||
<meta property="og:title" content="chatFull">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Detailed chat info">
|
||||
<meta property="og:description" content="Full info about a legacy group.">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatFull" >chatFull</a></li></ul></div>
|
||||
<h1 id="dev_page_title">chatFull</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Detailed chat info</p>
|
||||
<div id="dev_page_content"><p>Full info about a <a href="/api/channel#legacy-groups">legacy group</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -174,7 +174,9 @@
|
|||
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
|
||||
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p>
|
||||
<h4><a class="anchor" href="#message-reactions" id="message-reactions" name="message-reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Message reactions</a></h4>
|
||||
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p></div>
|
||||
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-legacy-groups" id="channels-supergroups-gigagroups-and-legacy-groups" name="channels-supergroups-gigagroups-and-legacy-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and legacy groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, legacy groups, and what's the difference between them.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -104,6 +104,11 @@
|
|||
<td>Whether RTMP streams are allowed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>listeners_hidden</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.13?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether the listeners list is hidden and cannot be fetched</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Group call ID</td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.chatFull</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Extended info on chat and auxiliary data.">
|
||||
<meta property="description" content="Full info about a channel, supergroup, gigagroup or legacy group.">
|
||||
<meta property="og:title" content="messages.chatFull">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Extended info on chat and auxiliary data.">
|
||||
<meta property="og:description" content="Full info about a channel, supergroup, gigagroup or legacy group.">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messages.chatFull" >messages.chatFull</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.chatFull</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Extended info on chat and auxiliary data.</p>
|
||||
<div id="dev_page_content"><p>Full info about a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a>, <a href="/api/channel#gigagroups">gigagroup</a> or <a href="/api/channel#legacy-groups">legacy group</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -66,22 +66,25 @@
|
|||
<tr>
|
||||
<td><strong>full_chat</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/ChatFull">ChatFull</a></td>
|
||||
<td>Extended info on a chat</td>
|
||||
<td>Full info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>chats</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/Chat">Chat</a>></td>
|
||||
<td>List containing basic info on chat</td>
|
||||
<td>Mentioned chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>users</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/User">User</a>></td>
|
||||
<td>List of users mentioned above</td>
|
||||
<td>Mentioned users</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/messages.ChatFull">messages.ChatFull</a></p></div>
|
||||
<p><a href="/type/messages.ChatFull">messages.ChatFull</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-legacy-groups" id="channels-supergroups-gigagroups-and-legacy-groups" name="channels-supergroups-gigagroups-and-legacy-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and legacy groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, legacy groups, and what's the difference between them.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>channels.getFullChannel</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Get full info about a channel">
|
||||
<meta property="description" content="Get full info about a supergroup, gigagroup or channel">
|
||||
<meta property="og:title" content="channels.getFullChannel">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Get full info about a channel">
|
||||
<meta property="og:description" content="Get full info about a supergroup, gigagroup or channel">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/channels.getFullChannel" >channels.getFullChannel</a></li></ul></div>
|
||||
<h1 id="dev_page_title">channels.getFullChannel</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Get full info about a channel</p>
|
||||
<div id="dev_page_content"><p>Get full info about a <a href="/api/channel#supergroups">supergroup</a>, <a href="/api/channel#gigagroups">gigagroup</a> or <a href="/api/channel#channels">channel</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -68,7 +68,7 @@
|
|||
<tr>
|
||||
<td><strong>channel</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputChannel">InputChannel</a></td>
|
||||
<td>The channel to get info about</td>
|
||||
<td>The <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a> or <a href="/api/channel#gigagroups">gigagroup</a> to get info about</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -111,7 +111,10 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-legacy-groups" id="channels-supergroups-gigagroups-and-legacy-groups" name="channels-supergroups-gigagroups-and-legacy-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and legacy groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, legacy groups, and what's the difference between them.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<p><a href="/type/Bool">Bool</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#channelfull" id="channelfull" name="channelfull"><i class="anchor-icon"></i></a><a href="/constructor/channelFull">channelFull</a></h4>
|
||||
<p>Full info about a <a href="/api/channel">channel/supergroup</a></p>
|
||||
<p>Full info about a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a> or <a href="/api/channel#gigagroups">gigagroup</a>.</p>
|
||||
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
|
||||
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p></div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.getFullChat</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Returns full chat info according to its ID.">
|
||||
<meta property="description" content="Get full info about a legacy group.">
|
||||
<meta property="og:title" content="messages.getFullChat">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Returns full chat info according to its ID.">
|
||||
<meta property="og:description" content="Get full info about a legacy group.">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getFullChat" >messages.getFullChat</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getFullChat</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Returns full chat info according to its ID.</p>
|
||||
<div id="dev_page_content"><p>Get full info about a <a href="/api/channel#legacy-groups">legacy group</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -68,7 +68,7 @@
|
|||
<tr>
|
||||
<td><strong>chat_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Chat ID</td>
|
||||
<td><a href="/api/channel#legacy-groups">Legacy group</a> ID.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -96,7 +96,10 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-legacy-groups" id="channels-supergroups-gigagroups-and-legacy-groups" name="channels-supergroups-gigagroups-and-legacy-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and legacy groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, legacy groups, and what's the difference between them.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -577,7 +577,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.getFullChannel">channels.getFullChannel</a></td>
|
||||
<td>Get full info about a channel</td>
|
||||
<td>Get full info about a <a href="/api/channel#supergroups">supergroup</a>, <a href="/api/channel#gigagroups">gigagroup</a> or <a href="/api/channel#channels">channel</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.getGroupsForDiscussion">channels.getGroupsForDiscussion</a></td>
|
||||
|
@ -759,7 +759,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getFullChat">messages.getFullChat</a></td>
|
||||
<td>Returns full chat info according to its ID.</td>
|
||||
<td>Get full info about a <a href="/api/channel#legacy-groups">legacy group</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.migrateChat">messages.migrateChat</a></td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>ChatFull</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Object containing detailed group info">
|
||||
<meta property="description" content="Full info about a channel, supergroup, gigagroup or legacy group.">
|
||||
<meta property="og:title" content="ChatFull">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Object containing detailed group info">
|
||||
<meta property="og:description" content="Full info about a channel, supergroup, gigagroup or legacy group.">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/ChatFull" >ChatFull</a></li></ul></div>
|
||||
<h1 id="dev_page_title">ChatFull</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Object containing detailed group info</p>
|
||||
<div id="dev_page_content"><p>Full info about a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a>, <a href="/api/channel#gigagroups">gigagroup</a> or <a href="/api/channel#legacy-groups">legacy group</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -72,7 +72,10 @@
|
|||
<td>Full info about a <a href="/api/channel">channel/supergroup</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-legacy-groups" id="channels-supergroups-gigagroups-and-legacy-groups" name="channels-supergroups-gigagroups-and-legacy-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and legacy groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, legacy groups, and what's the difference between them.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.ChatFull</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Object contains extended info on chat with auxiliary data.">
|
||||
<meta property="description" content="Full info about a channel, supergroup, gigagroup or legacy group.">
|
||||
<meta property="og:title" content="messages.ChatFull">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Object contains extended info on chat with auxiliary data.">
|
||||
<meta property="og:description" content="Full info about a channel, supergroup, gigagroup or legacy group.">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/messages.ChatFull" >messages.ChatFull</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.ChatFull</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Object contains extended info on chat with auxiliary data.</p>
|
||||
<div id="dev_page_content"><p>Full info about a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a>, <a href="/api/channel#gigagroups">gigagroup</a> or <a href="/api/channel#legacy-groups">legacy group</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -70,7 +70,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/messages.chatFull">messages.chatFull</a></td>
|
||||
<td>Extended info on chat and auxiliary data.</td>
|
||||
<td>Full info about a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a>, <a href="/api/channel#gigagroups">gigagroup</a> or <a href="/api/channel#legacy-groups">legacy group</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -92,7 +92,10 @@
|
|||
<td>Get full info about a channel</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-legacy-groups" id="channels-supergroups-gigagroups-and-legacy-groups" name="channels-supergroups-gigagroups-and-legacy-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and legacy groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, legacy groups, and what's the difference between them.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -41,90 +41,85 @@
|
|||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands and <a href="#inline-mode">inline requests</a>. You control your bots using HTTPS requests to Telegram's <a href="/bots/api">Bot API</a>.</p>
|
||||
<p>Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands and <a href="#inline-mode">inline requests</a>. You control your bots using HTTPS requests to Telegram's <a href="/bots/api">Bot API</a>.</p>
|
||||
<blockquote>
|
||||
<p>The <a href="/bots/api">full API reference</a> for <strong>developers</strong> is available <a href="/bots/api">here</a>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#1-what-can-i-do-with-bots" id="1-what-can-i-do-with-bots" name="1-what-can-i-do-with-bots"><i class="anchor-icon"></i></a>1. What can I do with bots?</h3>
|
||||
<h3><a class="anchor" name="1-what-can-i-do-with-bots" href="#1-what-can-i-do-with-bots"><i class="anchor-icon"></i></a>1. What can I do with bots?</h3>
|
||||
<div class="dev_side_image">
|
||||
<a href="/file/811140081/1/VldnlW70g2I/a140b0216e7d156ebc" target="_blank"><img src="/file/811140663/1/uHVzwsRJz3Y/a499733c59840694ca" title="A chat with a bot also showing search results from the @gif inline-bot"></a>
|
||||
<a href="/file/811140081/1/VldnlW70g2I/a140b0216e7d156ebc" target="_blank"><img src="/file/811140663/1/uHVzwsRJz3Y/a499733c59840694ca" title="A chat with a bot also showing search results from the @gif inline-bot"/></a>
|
||||
</div>
|
||||
|
||||
<p>To name just a few things, you could use bots to:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Get customized notifications and news</strong>. A bot can act as a smart newspaper, sending you relevant content as soon as it's published.</p>
|
||||
<li><p><strong>Get customized notifications and news</strong>. A bot can act as a smart newspaper, sending you relevant content as soon as it's published.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Integrate with other services</strong>. A bot can enrich Telegram chats with content from external services.
|
||||
<a href="https://t.me/gmailbot"><strong>Gmail Bot</strong></a>, <a href="https://t.me/gif"><strong>GIF bot</strong></a>, <a href="https://t.me/imdb"><strong>IMDB bot</strong></a>, <a href="https://t.me/wiki"><strong>Wiki bot</strong></a>, <a href="https://t.me/music"><strong>Music bot</strong></a>, <a href="https://t.me/youtube"><strong>Youtube bot</strong></a>, <a href="https://t.me/githubbot"><strong>GitHubBot</strong></a></p>
|
||||
<li><p><strong>Integrate with other services</strong>. A bot can enrich Telegram chats with content from external services.<br><a href="https://t.me/gmailbot"><strong>Gmail Bot</strong></a>, <a href="https://t.me/gif"><strong>GIF bot</strong></a>, <a href="https://t.me/imdb"><strong>IMDB bot</strong></a>, <a href="https://t.me/wiki"><strong>Wiki bot</strong></a>, <a href="https://t.me/music"><strong>Music bot</strong></a>, <a href="https://t.me/youtube"><strong>Youtube bot</strong></a>, <a href="https://t.me/githubbot"><strong>GitHubBot</strong></a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Accept payments from Telegram users</strong>. A bot can offer paid services or work as a virtual storefront. <a href="/bots/payments">Read more »</a>
|
||||
<a href="https://t.me/shopbot"><strong>Demo Shop Bot</strong></a>, <a href="https://t.me/teststore"><strong>Demo Store</strong></a></p>
|
||||
<li><p><strong>Accept payments from Telegram users</strong>. A bot can offer paid services or work as a virtual storefront. <a href="/bots/payments">Read more »</a><br><a href="https://t.me/shopbot"><strong>Demo Shop Bot</strong></a>, <a href="https://t.me/teststore"><strong>Demo Store</strong></a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Create custom tools</strong>. A bot may provide you with alerts, weather forecasts, translations, formatting or other services.
|
||||
<a href="https://t.me/Bold"><strong>Markdown bot</strong></a>, <a href="https://t.me/sticker"><strong>Sticker bot</strong></a>, <a href="https://t.me/vote"><strong>Vote bot</strong></a>, <a href="https://t.me/like"><strong>Like bot</strong></a></p>
|
||||
<li><p><strong>Create custom tools</strong>. A bot may provide you with alerts, weather forecasts, translations, formatting or other services.<br><a href="https://t.me/Bold"><strong>Markdown bot</strong></a>, <a href="https://t.me/sticker"><strong>Sticker bot</strong></a>, <a href="https://t.me/vote"><strong>Vote bot</strong></a>, <a href="https://t.me/like"><strong>Like bot</strong></a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Build single- and multiplayer games</strong>. A bot can offer rich <a href="/bots/games">HTML5 experiences</a>, from simple arcades and puzzles to 3D-shooters and real-time strategy games.
|
||||
<a href="https://t.me/gamebot"><strong>GameBot</strong></a>, <a href="https://t.me/gamee"><strong>Gamee</strong></a></p>
|
||||
<li><p><strong>Build single- and multiplayer games</strong>. A bot can offer rich <a href="/bots/games">HTML5 experiences</a>, from simple arcades and puzzles to 3D-shooters and real-time strategy games.<br><a href="https://t.me/gamebot"><strong>GameBot</strong></a>, <a href="https://t.me/gamee"><strong>Gamee</strong></a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Build social services</strong>. A bot could connect people looking for conversation partners based on common interests or proximity.</p>
|
||||
<li><p><strong>Build social services</strong>. A bot could connect people looking for conversation partners based on common interests or proximity.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Do virtually anything else</strong>. Except for dishes — bots are terrible at doing the dishes.</p>
|
||||
<li><p><strong>Do virtually anything else</strong>. Except for dishes — bots are terrible at doing the dishes.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2-how-do-bots-work" id="2-how-do-bots-work" name="2-how-do-bots-work"><i class="anchor-icon"></i></a>2. How do bots work?</h3>
|
||||
<h3><a class="anchor" name="2-how-do-bots-work" href="#2-how-do-bots-work"><i class="anchor-icon"></i></a>2. How do bots work?</h3>
|
||||
<p>At the core, Telegram Bots are special accounts that do not require an additional phone number to set up. Users can interact with bots in two ways:</p>
|
||||
<ul>
|
||||
<li>Send messages and <a href="#commands">commands</a> to bots by opening a chat with them or by adding them to groups.</li>
|
||||
<li>Send requests directly from the input field by typing the bot's @username and a query. This allows sending content from <a href="/bots/inline">inline bots</a> directly into any chat, group or channel.</li>
|
||||
<li>Send requests directly from the input field by typing the bot's @username and a query. This allows sending content from <a href="/bots/inline">inline bots</a> directly into any chat, group or channel.</li>
|
||||
</ul>
|
||||
<p>Messages, commands and requests sent by users are passed to the software running on your servers. Our intermediary server handles all encryption and communication with the Telegram API for you. You communicate with this server via a simple HTTPS-interface that offers a simplified version of the Telegram API. We call that interface our <a href="/bots/api">Bot API</a>.</p>
|
||||
<blockquote>
|
||||
<p>A detailed description of the Bot API is available on <a href="/bots/api">this page »</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#3-how-do-i-create-a-bot" id="3-how-do-i-create-a-bot" name="3-how-do-i-create-a-bot"><i class="anchor-icon"></i></a>3. How do I create a bot?</h3>
|
||||
<h3><a class="anchor" name="3-how-do-i-create-a-bot" href="#3-how-do-i-create-a-bot"><i class="anchor-icon"></i></a>3. How do I create a bot?</h3>
|
||||
<div class="dev_side_image">
|
||||
<a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140763/1/PihKNbjT8UE/03b57814e13713da37" title="The Botfather. Click for hi-res picture"></a>
|
||||
<a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140763/1/PihKNbjT8UE/03b57814e13713da37" title="The Botfather. Click for hi-res picture"/></a>
|
||||
</div>
|
||||
<p>There's a... bot for that. Just talk to <a href="https://t.me/botfather">BotFather</a> (described <a href="#6-botfather">below</a>) and follow a few simple steps. Once you've created a bot and received your authentication token, head down to the <a href="/bots/api">Bot API manual</a> to see what you can teach your bot to do.</p>
|
||||
|
||||
<p>There's a… bot for that. Just talk to <a href="https://t.me/botfather">BotFather</a> (described <a href="#6-botfather">below</a>) and follow a few simple steps. Once you've created a bot and received your authentication token, head down to the <a href="/bots/api">Bot API manual</a> to see what you can teach your bot to do.</p>
|
||||
<blockquote>
|
||||
<p>You may also like to check out some <strong>code examples</strong> <a href="/bots/samples">here »</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#4-how-are-bots-different-from-humans" id="4-how-are-bots-different-from-humans" name="4-how-are-bots-different-from-humans"><i class="anchor-icon"></i></a>4. How are bots different from humans?</h3>
|
||||
<h3><a class="anchor" name="4-how-are-bots-different-from-humans" href="#4-how-are-bots-different-from-humans"><i class="anchor-icon"></i></a>4. How are bots different from humans?</h3>
|
||||
<ul>
|
||||
<li>Bots have no online status and no last seen timestamps, the interface shows the label <strong>'bot'</strong> instead.</li>
|
||||
<li>Bots have limited cloud storage — older messages may be removed by the server shortly after they have been processed.</li>
|
||||
<li>Bots can't initiate conversations with users. A user <strong>must</strong> either add them to a group or send them a message first. People can use <code>t.me/<bot_username></code> links or username search to find your bot.</li>
|
||||
<li>Bot usernames always end in 'bot' (e.g. <a href="https://t.me/triviabot">@TriviaBot</a>, <a href="https://t.me/githubbot">@GitHub_bot</a>).</li>
|
||||
<li>Bots have no online status and no last seen timestamps, the interface shows the label <strong>'bot'</strong> instead.</li>
|
||||
<li>Bots have limited cloud storage — older messages may be removed by the server shortly after they have been processed.</li>
|
||||
<li>Bots can't initiate conversations with users. A user <strong>must</strong> either add them to a group or send them a message first. People can use <code>t.me/<bot_username></code> links or username search to find your bot.</li>
|
||||
<li>Bot usernames always end in 'bot' (e.g. <a href="https://t.me/triviabot">@TriviaBot</a>, <a href="https://t.me/githubbot">@GitHub_bot</a>).</li>
|
||||
<li>When added to a group, bots do not receive all messages by default (see <a href="#privacy-mode">Privacy mode</a>).</li>
|
||||
<li>Bots never eat, sleep or complain (unless expressly programmed otherwise).</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#5-bot-perks" id="5-bot-perks" name="5-bot-perks"><i class="anchor-icon"></i></a>5. Bot perks</h3>
|
||||
<h3><a class="anchor" name="5-bot-perks" href="#5-bot-perks"><i class="anchor-icon"></i></a>5. Bot perks</h3>
|
||||
<p>Telegram bots are unique in many ways — we offer <a href="#keyboards">two</a> <a href="#inline-keyboards-and-on-the-fly-updating">kinds</a> of keyboards, additional interfaces for <a href="#global-commands">default commands</a> and <a href="#deep-linking">deep linking</a> as well as <a href="/bots/api#formatting-options">text formatting</a>, <a href="#payment-platform">integrated payments</a> and more.</p>
|
||||
<h4><a class="anchor" href="#inline-mode" id="inline-mode" name="inline-mode"><i class="anchor-icon"></i></a>Inline mode</h4>
|
||||
<h4><a class="anchor" name="inline-mode" href="#inline-mode"><i class="anchor-icon"></i></a>Inline mode</h4>
|
||||
<!--<div class="dev_side_image">
|
||||
<a href="/file/811140221/1/fW9vnLya4Fg/e2b5c530c7b0e019c4" target="_blank"><img src="/file/811140530/1/h-eMmPp2vp4/cd4a109f75e6561305" title="Inline bots. Click for hi-res picture">
|
||||
</a></div>-->
|
||||
<p>Users can interact with your bot via <a href="/bots/api#inline-mode"><strong>inline queries</strong></a> straight from the <strong>text input field</strong> in <strong>any</strong> chat. All they need to do is start a message with your bot's username and then type a query.</p>
|
||||
<p>Having received the query, your bot can return some results. As soon as the user taps one of them, it is sent to the user's currently opened chat. This way, people can request content from your bot in any of their chats, groups or channels.</p>
|
||||
|
||||
<p>Users can interact with your bot via <a href="/bots/api#inline-mode"><strong>inline queries</strong></a> straight from the <strong>text input field</strong> in <strong>any</strong> chat. All they need to do is start a message with your bot's username and then type a query.</p>
|
||||
<p>Having received the query, your bot can return some results. As soon as the user taps one of them, it is sent to the user's currently opened chat. This way, people can request content from your bot in any of their chats, groups or channels.</p>
|
||||
<p>Check out this <a href="https://telegram.org/blog/inline-bots">blog</a> to see a sample inline bot in action. You can also try the <a href="https://t.me/sticker">@sticker</a> and <a href="https://t.me/music">@music</a> bots to see for yourself.</p>
|
||||
<div><center>
|
||||
<a href="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" target="_blank"><img src="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" title="New input field" style="width: 295px; padding: 10px 0px;"></a></center>
|
||||
<a href="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" target="_blank"><img src="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" title="New input field" style="width: 295px; padding: 10px 0px;" /></a></center>
|
||||
|
||||
</div>
|
||||
<p>We've also implemented an easy way for your bot to <a href="/bots/inline#switching-inline-pm-modes">switch between inline and PM modes</a>.</p>
|
||||
|
||||
<p>We've also implemented an easy way for your bot to <a href="/bots/inline#switching-inline-pm-modes">switch between inline and PM modes</a>.</p>
|
||||
<blockquote>
|
||||
<p><a href="/bots/inline">Read more about the Inline Mode »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#payment-platform" id="payment-platform" name="payment-platform"><i class="anchor-icon"></i></a>Payment platform</h4>
|
||||
<h4><a class="anchor" name="payment-platform" href="#payment-platform"><i class="anchor-icon"></i></a>Payment platform</h4>
|
||||
<!--<div class="dev_side_image">
|
||||
<a href="/file/811140227/2/ZTXUngAbELM.193805/ba6aa233d1d4206207" target="_blank"><img src="/file/811140095/1/lfTvDVqVS8M.43169/1a191248e6cf027581" title="Payments API. Click for hi-res picture">
|
||||
</a></div>-->
|
||||
|
||||
<p>You can use bots to <strong>accept payments</strong> from Telegram users around the world.</p>
|
||||
<ul>
|
||||
<li>Send invoices to <strong>any chat</strong>, including to groups and channels.</li>
|
||||
|
@ -132,24 +127,26 @@
|
|||
<li>Use <a href="/bots/inline">inline mode</a> to help users show your goods and services to their friends and communities.</li>
|
||||
<li>Allow <strong>tips</strong> from users with preset and custom amounts.</li>
|
||||
<li>Accept payments from users on mobile or <strong>desktop apps</strong>.</li>
|
||||
<li>Try <a href="https://t.me/shopbot">@ShopBot</a> to create a test invoice – or start a message with <code>@ShopBot ...</code> in any chat for an <strong>inline invoice</strong>.</li>
|
||||
<li>Try <a href="https://t.me/shopbot">@ShopBot</a> to create a test invoice – or start a message with <code>@ShopBot ...</code> in any chat for an <strong>inline invoice</strong>.</li>
|
||||
<li>Check out <a href="https://telegram.org/teststore">Demo Shop</a> for an example of a <a href="https://telegram.org/tour/channels">Telegram Channel</a> used as <strong>virtual storefront</strong>.</li>
|
||||
</ul>
|
||||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001377/1/0o3vSvY22g8.123356/deb4ed6951d780f7b7" style="max-width: 400px;" title="If your pizza place can't deliver a clone army, you're buying pizza from the wrong shop." alt="Video: Ordering a pizza through a Telegram channel">
|
||||
<source src="/file/464001705/2/Hg-klQnZ_n4.4889245.mp4/d324511ffdab7b4668" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="/bots/payments">Read more about the Payments Platform »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#gaming-platform" id="gaming-platform" name="gaming-platform"><i class="anchor-icon"></i></a>Gaming platform</h4>
|
||||
<h4><a class="anchor" name="gaming-platform" href="#gaming-platform"><i class="anchor-icon"></i></a>Gaming platform</h4>
|
||||
<p>Bots can offer their users <strong>HTML5 games</strong> to play solo or to compete against each other in groups and one-on-one chats. The platform allows your bot to keep track of <strong>high scores</strong> for every game played in every chat. Whenever there’s a new leader in the game, other playing members in the chat are notified that they need to step it up. </p>
|
||||
<div><center>
|
||||
<a href="/file/811140306/1/dkciuEDbpxU.193188/8a0a21b6e9d111be4c" target="_blank"><img src="/file/811140306/1/dkciuEDbpxU.193188/8a0a21b6e9d111be4c" title="Game in a chat" style="width: 250px; padding: 10px 5px"></a>
|
||||
<a href="/file/811140426/1/ZCw3vu_v8s0.109692/04efd9e88644939a4f" target="_blank"><img src="/file/811140426/1/ZCw3vu_v8s0.109692/04efd9e88644939a4f" title="In-game scoreboard and sharing button" style="width: 250px; padding: 10px 5px"></a>
|
||||
<a href="/file/811140306/1/dkciuEDbpxU.193188/8a0a21b6e9d111be4c" target="_blank"><img src="/file/811140306/1/dkciuEDbpxU.193188/8a0a21b6e9d111be4c" title="Game in a chat" style="width: 250px; padding: 10px 5px" /></a>
|
||||
<a href="/file/811140426/1/ZCw3vu_v8s0.109692/04efd9e88644939a4f" target="_blank"><img src="/file/811140426/1/ZCw3vu_v8s0.109692/04efd9e88644939a4f" title="In-game scoreboard and sharing button" style="width: 250px; padding: 10px 5px" /></a>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<p>Since the underlying technology is HTML5, the games can be anything from simple arcades and puzzles to multiplayer 3D-shooters and real-time strategy games. Our team has created a couple of simple demos for you to try out:</p>
|
||||
<ul>
|
||||
<li><a href="https://t.me/gamebot?game=MathBattle">Math Battle</a></li>
|
||||
|
@ -160,141 +157,157 @@
|
|||
<blockquote>
|
||||
<p><a href="https://telegram.org/blog/games">Read more about the Gaming Platform »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#keyboards" id="keyboards" name="keyboards"><i class="anchor-icon"></i></a>Keyboards</h4>
|
||||
<h4><a class="anchor" name="keyboards" href="#keyboards"><i class="anchor-icon"></i></a>Keyboards</h4>
|
||||
<p>Traditional chat bots can of course be taught to understand human language. But sometimes you want some more formal input from the user — and this is where <strong>custom keyboards</strong> can become extremely useful.</p>
|
||||
<p>Whenever your bot sends a message, it can pass along a special keyboard with predefined reply options (see <a href="/bots/api/#replykeyboardmarkup">ReplyKeyboardMarkup</a>). Telegram apps that receive the message will display your keyboard to the user. Tapping any of the buttons will immediately send the respective command. This way you can drastically simplify user interaction with your bot.</p>
|
||||
<p>We currently support text and emoji for your buttons. Here are some custom keyboard examples:</p>
|
||||
<center>
|
||||
<div>
|
||||
<a href="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" target="_blank"><img src="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" title="Keyboard for a poll bot" style="max-height: 300px; padding: 10px 5px"></a>
|
||||
<pre><code><a href="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" target="_blank"><img src="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" title="Keyboard for a calculator bot. Because you can." style="max-height: 300px; padding: 10px 5px" /></a>
|
||||
<a href="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" target="_blank"><img src="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" title="Keyboard for a poll bot" style="max-height: 300px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" target="_blank"><img src="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" title="Keyboard for a calculator bot. Because you can." style="max-height: 300px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" target="_blank"><img src="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" title="Keyboard for a trivia bot" style="max-height: 300px; padding: 10px 5px" /></a>
|
||||
|
||||
|
||||
<a href="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" target="_blank"><img src="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" title="Keyboard for a trivia bot" style="max-height: 300px; padding: 10px 5px" /></a></code></pre>
|
||||
</div></center>
|
||||
|
||||
<blockquote>
|
||||
<p>For more technical information on custom keyboards, please consult the <a href="/bots/api">Bot API manual</a> (see <a href="/bots/api#sendmessage">sendMessage</a>).</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#inline-keyboards-and-on-the-fly-updating" id="inline-keyboards-and-on-the-fly-updating" name="inline-keyboards-and-on-the-fly-updating"><i class="anchor-icon"></i></a>Inline keyboards and on-the-fly updating</h4>
|
||||
<p>There are times when you'd prefer to do things without sending any messages to the chat. For example, when your user is changing settings or flipping through search results. In such cases you can use Inline Keyboards that are integrated directly into the messages they belong to. </p>
|
||||
<p>Unlike with custom reply keyboards, pressing buttons on inline keyboards doesn't result in messages sent to the chat. Instead, inline keyboards support buttons that work behind the scenes: <a href="/bots/2-0-intro#callback-buttons">callback buttons</a>, <a href="/bots/2-0-intro#url-buttons">URL buttons</a> and <a href="/bots/2-0-intro#switch-to-inline-buttons">switch to inline buttons</a>.</p>
|
||||
<h4><a class="anchor" name="inline-keyboards-and-on-the-fly-updating" href="#inline-keyboards-and-on-the-fly-updating"><i class="anchor-icon"></i></a>Inline keyboards and on-the-fly updating</h4>
|
||||
<p>There are times when you'd prefer to do things without sending any messages to the chat. For example, when your user is changing settings or flipping through search results. In such cases you can use Inline Keyboards that are integrated directly into the messages they belong to. </p>
|
||||
<p>Unlike with custom reply keyboards, pressing buttons on inline keyboards doesn't result in messages sent to the chat. Instead, inline keyboards support buttons that work behind the scenes: <a href="/bots/2-0-intro#callback-buttons">callback buttons</a>, <a href="/bots/2-0-intro#url-buttons">URL buttons</a> and <a href="/bots/2-0-intro#switch-to-inline-buttons">switch to inline buttons</a>.</p>
|
||||
<div><center>
|
||||
<a href="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" target="_blank"><img src="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" title="Callback buttons in @music" style="width: 240px; padding: 10px 5px;"></a>
|
||||
<a href="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" target="_blank"><img src="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" title="More callback buttons in @music" style="width: 240px; padding: 10px 5px;"></a>
|
||||
<a href="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" target="_blank"><img src="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" title="A URL button" style="width:240px; padding:10px 5px"></a>
|
||||
</center>
|
||||
<a href="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" target="_blank"><img src="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" title="Callback buttons in @music" style="width: 240px; padding: 10px 5px;" /></a>
|
||||
<a href="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" target="_blank"><img src="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" title="More callback buttons in @music" style="width: 240px; padding: 10px 5px;" /></a>
|
||||
<a href="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" target="_blank"><img src="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" title="A URL button" style="width:240px; padding:10px 5px"/></a>
|
||||
|
||||
</center>
|
||||
|
||||
</div>
|
||||
|
||||
<p>When callback buttons are used, your bot can update its existing messages (or just their keyboards) so that the chat remains tidy. Check out these sample bots to see inline keyboards in action: <a href="https://t.me/music">@music</a>, <a href="https://t.me/vote">@vote</a>, <a href="https://t.me/like">@like</a>.</p>
|
||||
<blockquote>
|
||||
<p><a href="/bots/2-0-intro#new-inline-keyboards">Read more about inline keyboards and on-the-fly editing »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#commands" id="commands" name="commands"><i class="anchor-icon"></i></a>Commands</h4>
|
||||
<h4><a class="anchor" name="commands" href="#commands"><i class="anchor-icon"></i></a>Commands</h4>
|
||||
<p>Commands present a more flexible way to communicate with your bot. The following syntax may be used:</p>
|
||||
<pre><code>/command</code></pre>
|
||||
<p>A command must always start with the '/' symbol and may not be longer than 32 characters. Commands can use latin letters, numbers and underscores. Here are a few examples:</p>
|
||||
<p>A command must always start with the '/' symbol and may not be longer than 32 characters. Commands can use latin letters, numbers and underscores. Here are a few examples:</p>
|
||||
<pre><code>/get_messages_stats
|
||||
/set_timer 10min Alarm!
|
||||
/get_timezone London, UK</code></pre>
|
||||
<p>Messages that start with a slash are always passed to the bot (along with replies to its messages and messages that @mention the bot by username). Telegram apps will:</p>
|
||||
<ul>
|
||||
<li>Suggest a list of supported commands with descriptions when the user enters a '/' (for this to work, you need to have provided a list of commands to the <a href="#6-botfather">BotFather</a>). Tapping on a command in the list immediately sends the command.</li>
|
||||
<li>Show an additional <strong>(/)</strong> button in the input field in all chats with bots. Tapping it types a '/' and shows the list of commands.</li>
|
||||
<li>Suggest a list of supported commands with descriptions when the user enters a '/' (for this to work, you need to have provided a list of commands to the <a href="#6-botfather">BotFather</a>). Tapping on a command in the list immediately sends the command.</li>
|
||||
<li>Show an additional <strong>(/)</strong> button in the input field in all chats with bots. Tapping it types a '/' and shows the list of commands.</li>
|
||||
<li>Highlight <strong>/commands</strong> in messages. When the user taps a highlighted command, the command is sent at once.</li>
|
||||
</ul>
|
||||
<center><div>
|
||||
<a href="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" target="_blank"><img src="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" title="Suggested commands" style="width: 230px; padding: 10px 5px"></a>
|
||||
<pre><code><a href="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" target="_blank"><img src="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" title="Notice the new button in the input field, right next to the sticker button" style="width: 230px; padding: 10px 5px" /></a>
|
||||
<a href="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" target="_blank"><img src="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" title="Suggested commands" style="width: 230px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" target="_blank"><img src="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" title="Notice the new button in the input field, right next to the sticker button" style="width: 230px; padding: 10px 5px" /></a>
|
||||
|
||||
|
||||
<a href="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" target="_blank"><img src="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" title="Suggested commands for multiple bots" style="width: 230px; padding: 10px 5px" /></a></code></pre>
|
||||
<a href="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" target="_blank"><img src="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" title="Suggested commands for multiple bots" style="width: 230px; padding: 10px 5px" /></a>
|
||||
|
||||
</div></center>
|
||||
|
||||
|
||||
<p>If multiple bots are in a group, it is possible to add bot usernames to commands in order to avoid confusion:</p>
|
||||
<pre><code>/start@TriviaBot
|
||||
/start@ApocalypseBot</code></pre>
|
||||
<p>This is done automatically when commands are selected via the list of suggestions. Please remember that your bot needs to be able to process commands that are followed by its username.</p>
|
||||
<h5><a class="anchor" href="#global-commands" id="global-commands" name="global-commands"><i class="anchor-icon"></i></a>Global commands</h5>
|
||||
<h5><a class="anchor" name="global-commands" href="#global-commands"><i class="anchor-icon"></i></a>Global commands</h5>
|
||||
<p>In order to make it easier for users to navigate the bot multiverse, we ask all developers to support a few basic commands. Telegram apps will have <strong>interface shortcuts</strong> for these commands.</p>
|
||||
<ul>
|
||||
<li><strong>/start</strong> - begins interaction with the user, e.g., by sending a greeting message. This command can also be used to pass additional parameters to the bot (see <a href="#deep-linking">Deep linking</a>)</li>
|
||||
<li><strong>/help</strong> - returns a help message. It can be a short text about what your bot can do and a list of commands.</li>
|
||||
<li><strong>/settings</strong> - (if applicable) returns the bot's settings for this user and suggests commands to edit these settings.</li>
|
||||
<li><strong>/settings</strong> - (if applicable) returns the bot's settings for this user and suggests commands to edit these settings.</li>
|
||||
</ul>
|
||||
<p>Users will see a <strong>Start</strong> button when they first open a conversation with your bot. <strong>Help</strong> and <strong>Settings</strong> links will be available in the menu on the bot's profile page.</p>
|
||||
<p>Users will see a <strong>Start</strong> button when they first open a conversation with your bot. <strong>Help</strong> and <strong>Settings</strong> links will be available in the menu on the bot's profile page.</p>
|
||||
<center><div>
|
||||
<a href="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" target="_blank"><img src="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" title="An empty conversation with a bot" style="width: 250px; padding: 10px 5px"></a>
|
||||
<pre><code><a href="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" target="_blank"><img src="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" title="A bot's profile page, featuring 'Help' and 'Settings' buttons" style="width: 250px; padding: 10px 5px" /></a></code></pre>
|
||||
<a href="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" target="_blank"><img src="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" title="An empty conversation with a bot" style="width: 250px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" target="_blank"><img src="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" title="A bot's profile page, featuring 'Help' and 'Settings' buttons" style="width: 250px; padding: 10px 5px" /></a>
|
||||
|
||||
</div></center>
|
||||
<h4><a class="anchor" href="#formatting-bold-italic-fixed-width-text-and-inline-links" id="formatting-bold-italic-fixed-width-text-and-inline-links" name="formatting-bold-italic-fixed-width-text-and-inline-links"><i class="anchor-icon"></i></a>Formatting: bold, italic, fixed-width text and inline links</h4>
|
||||
<p>You can use bold, italic or fixed-width text, as well as inline links in your bots' messages. Telegram clients will render them accordingly. </p>
|
||||
|
||||
<h4><a class="anchor" name="formatting-bold-italic-fixed-width-text-and-inline-links" href="#formatting-bold-italic-fixed-width-text-and-inline-links"><i class="anchor-icon"></i></a>Formatting: bold, italic, fixed-width text and inline links</h4>
|
||||
<p>You can use bold, italic or fixed-width text, as well as inline links in your bots' messages. Telegram clients will render them accordingly. </p>
|
||||
<blockquote>
|
||||
<p><a href="bots/api#formatting-options">Read more in the Bot API manual »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#privacy-mode" id="privacy-mode" name="privacy-mode"><i class="anchor-icon"></i></a>Privacy mode</h4>
|
||||
<p>Bots are frequently added to groups in order to augment communication between human users, e.g. by providing news, notifications from external services or additional search functionality. This is especially true for work-related groups. Now, when you share a group with a bot, you tend to ask yourself "How can I be sure that the little rascal isn't selling my chat history to my competitors?" The answer is — <strong>privacy mode</strong>.</p>
|
||||
<h4><a class="anchor" name="privacy-mode" href="#privacy-mode"><i class="anchor-icon"></i></a>Privacy mode</h4>
|
||||
<p>Bots are frequently added to groups in order to augment communication between human users, e.g. by providing news, notifications from external services or additional search functionality. This is especially true for work-related groups. Now, when you share a group with a bot, you tend to ask yourself “How can I be sure that the little rascal isn't selling my chat history to my competitors?” The answer is — <strong>privacy mode</strong>.</p>
|
||||
<p>A bot running in privacy mode will not receive all messages that people send to the group. Instead, it will only receive:</p>
|
||||
<ul>
|
||||
<li>Messages that start with a slash '/' (see <a href="#commands">Commands</a> above)</li>
|
||||
<li>Replies to the bot's own messages</li>
|
||||
<li>Messages that start with a slash '/' (see <a href="#commands">Commands</a> above)</li>
|
||||
<li>Replies to the bot's own messages</li>
|
||||
<li>Service messages (people added or removed from the group, etc.)</li>
|
||||
<li>Messages from channels where it's a member</li>
|
||||
<li>Messages from channels where it's a member</li>
|
||||
</ul>
|
||||
<p>On one hand, this helps some of us sleep better at night (in our tinfoil nightcaps), on the other — it allows the bot developer to save a lot of resources, since they won't need to process tens of thousands irrelevant messages each day.</p>
|
||||
<p>Privacy mode is enabled by default for all bots, except bots that were added to the group as <strong>admins</strong> (bot admins always receive all messages). It can be disabled, so that the bot receives all messages like an ordinary user (the bot will need to be <strong>re-added</strong> to the group for this change to take effect). We only recommend doing this in cases where it is absolutely necessary for your bot to work — users can always see a bot's current privacy setting in the group members list. In most cases, using the <a href="/bots/api#forcereply">force reply</a> option for the bot's messages should be more than enough. </p>
|
||||
<p>On one hand, this helps some of us sleep better at night (in our tinfoil nightcaps), on the other — it allows the bot developer to save a lot of resources, since they won't need to process tens of thousands irrelevant messages each day.</p>
|
||||
<p>Privacy mode is enabled by default for all bots, except bots that were added to the group as <strong>admins</strong> (bot admins always receive all messages). It can be disabled, so that the bot receives all messages like an ordinary user (the bot will need to be <strong>re-added</strong> to the group for this change to take effect). We only recommend doing this in cases where it is absolutely necessary for your bot to work — users can always see a bot's current privacy setting in the group members list. In most cases, using the <a href="/bots/api#forcereply">force reply</a> option for the bot's messages should be more than enough. </p>
|
||||
<p><a href="/bots/faq#what-messages-will-my-bot-get">So what messages exactly will my bot get? »</a></p>
|
||||
<h4><a class="anchor" href="#deep-linking" id="deep-linking" name="deep-linking"><i class="anchor-icon"></i></a>Deep linking</h4>
|
||||
<p>Telegram bots have a <a href="https://en.wikipedia.org/wiki/Deep_linking">deep linking</a> mechanism, that allows for passing additional parameters to the bot on startup. It could be a command that launches the bot — or an authentication token to connect the user's Telegram account to their account on some external service.</p>
|
||||
<h4><a class="anchor" name="deep-linking" href="#deep-linking"><i class="anchor-icon"></i></a>Deep linking</h4>
|
||||
<p>Telegram bots have a <a href="https://en.wikipedia.org/wiki/Deep_linking">deep linking</a> mechanism, that allows for passing additional parameters to the bot on startup. It could be a command that launches the bot — or an authentication token to connect the user's Telegram account to their account on some external service.</p>
|
||||
<p>Each bot has a link that opens a conversation with it in Telegram — <code>https://t.me/<bot username></code>. You can add the parameters <strong>start</strong> or <strong>startgroup</strong> to this link, with values up to 64 characters long. For example:</p>
|
||||
<pre><code>https://t.me/triviabot?startgroup=test</code></pre>
|
||||
<p><code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code> are allowed. We recommend using <a href="https://en.wikipedia.org/wiki/Base64#The_URL_applications">base64url</a> to encode parameters with binary and other types of content.</p>
|
||||
<p>Following a link with the <strong>start</strong> parameter will open a one-on-one conversation with the bot, showing a START button in the place of the input field. If the <strong>startgroup</strong> parameter is used, the user is prompted to select a group to add the bot to. As soon as a user confirms the action (presses the START button in their app or selects a group to add the bot to), your bot will receive a message from that user in this format:</p>
|
||||
<pre><code>/start PAYLOAD</code></pre>
|
||||
<p><code>PAYLOAD</code> stands for the value of the <strong>start</strong> or <strong>startgroup</strong> parameter that was passed in the link.</p>
|
||||
<h5><a class="anchor" href="#deep-linking-example" id="deep-linking-example" name="deep-linking-example"><i class="anchor-icon"></i></a>Deep linking Example</h5>
|
||||
<p>Suppose the website example.com would like to send notifications to its users via a Telegram bot. Here's what they could do to enable notifications for a user with the ID <code>123</code>.</p>
|
||||
<h5><a class="anchor" name="deep-linking-example" href="#deep-linking-example"><i class="anchor-icon"></i></a>Deep linking Example</h5>
|
||||
<p>Suppose the website example.com would like to send notifications to its users via a Telegram bot. Here's what they could do to enable notifications for a user with the ID <code>123</code>.</p>
|
||||
<ol>
|
||||
<li><a href="#6-botfather">Create a bot</a> with a suitable username, e.g. @ExampleComBot</li>
|
||||
<li>Set up a <a href="/bots/api#setwebhook">webhook</a> for incoming messages</li>
|
||||
<li>Generate a random string of a sufficient length, e.g. <code>$memcache_key = "vCH1vGWJxfSeofSAs0K5PA"</code></li>
|
||||
<li>Generate a random string of a sufficient length, e.g. <code>$memcache_key = "vCH1vGWJxfSeofSAs0K5PA"</code></li>
|
||||
<li>Put the value <code>123</code> with the key <code>$memcache_key</code> into Memcache for 3600 seconds (one hour) </li>
|
||||
<li>Show our user the button <code>https://t.me/ExampleComBot?start=vCH1vGWJxfSeofSAs0K5PA</code></li>
|
||||
<li>Configure the webhook processor to query Memcached with the parameter that is passed in incoming messages beginning with <code>/start</code>. If the key exists, record the chat_id passed to the webhook as <strong>telegram_chat_id</strong> for the user <code>123</code>. Remove the key from Memcache.</li>
|
||||
<li>Now when we want to send a notification to the user <code>123</code>, check if they have the field <strong>telegram_chat_id</strong>. If yes, use the <a href="/bots/api#sendmessage">sendMessage</a> method in the <a href="/bots/api">Bot API</a> to send them a message in Telegram.</li>
|
||||
</ol>
|
||||
<h4><a class="anchor" href="#location-and-number" id="location-and-number" name="location-and-number"><i class="anchor-icon"></i></a>Location and Number</h4>
|
||||
<p>Some bots need extra data from the user to work properly. For example, knowing the user's location helps provide more relevant geo-specific results. The user's phone number can be very useful for integrations with other services, like banks, etc.</p>
|
||||
<h4><a class="anchor" name="location-and-number" href="#location-and-number"><i class="anchor-icon"></i></a>Location and Number</h4>
|
||||
<p>Some bots need extra data from the user to work properly. For example, knowing the user's location helps provide more relevant geo-specific results. The user's phone number can be very useful for integrations with other services, like banks, etc.</p>
|
||||
<p>Bots can ask a user for their <strong>location</strong> and <strong>phone number</strong> using special buttons. Note that both phone number and location request buttons will only work in private chats.</p>
|
||||
<div><center>
|
||||
<a href="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" target="_blank"><img src="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" title="Phone number and location sharing buttons" style="width: 295px; padding: 10px 20px;"></a></center>
|
||||
<a href="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" target="_blank"><img src="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" title="Phone number and location sharing buttons" style="width: 295px; padding: 10px 20px;" /></a></center>
|
||||
|
||||
</div>
|
||||
<p>When these buttons are pressed, Telegram clients will display a confirmation alert that tells the user what's about to happen.</p>
|
||||
|
||||
<p>When these buttons are pressed, Telegram clients will display a confirmation alert that tells the user what's about to happen.</p>
|
||||
<blockquote>
|
||||
<p><a href="/bots/api#keyboardbutton">Manual: Number and location buttons »</a></p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#6-botfather" id="6-botfather" name="6-botfather"><i class="anchor-icon"></i></a>6. BotFather</h3>
|
||||
<h3><a class="anchor" name="6-botfather" href="#6-botfather"><i class="anchor-icon"></i></a>6. BotFather</h3>
|
||||
<blockquote>
|
||||
<p>Jump to top to learn everything about <a href="#">Telegram bots »</a></p>
|
||||
</blockquote>
|
||||
<p><a href="https://t.me/botfather">BotFather</a> is the one bot to rule them all. It will help you create new bots and change settings for existing ones.</p>
|
||||
<h4><a class="anchor" href="#creating-a-new-bot" id="creating-a-new-bot" name="creating-a-new-bot"><i class="anchor-icon"></i></a>Creating a new bot</h4>
|
||||
<h4><a class="anchor" name="creating-a-new-bot" href="#creating-a-new-bot"><i class="anchor-icon"></i></a>Creating a new bot</h4>
|
||||
<p>Use the <strong>/newbot</strong> command to create a new bot. The BotFather will ask you for a name and username, then generate an authentication token for your new bot. </p>
|
||||
<p>The <strong>name</strong> of your bot is displayed in contact details and elsewhere.</p>
|
||||
<p>The <strong>Username</strong> is a short name, to be used in mentions and t.me links. Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot's username <strong>must</strong> end in 'bot', e.g. 'tetris_bot' or 'TetrisBot'.</p>
|
||||
<p>The <strong>Username</strong> is a short name, to be used in mentions and t.me links. Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot's username <strong>must</strong> end in 'bot', e.g. 'tetris_bot' or 'TetrisBot'.</p>
|
||||
<p>The <strong>token</strong> is a string along the lines of <code>110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code> that is required to authorize the bot and send requests to the <a href="/bots/api">Bot API</a>. Keep your token secure and store it safely, it can be used by anyone to control your bot.</p>
|
||||
<h4><a class="anchor" href="#generating-an-authentication-token" id="generating-an-authentication-token" name="generating-an-authentication-token"><i class="anchor-icon"></i></a>Generating an authentication token</h4>
|
||||
<h4><a class="anchor" name="generating-an-authentication-token" href="#generating-an-authentication-token"><i class="anchor-icon"></i></a>Generating an authentication token</h4>
|
||||
<p>If your existing token is compromised or you lost it for some reason, use the <strong>/token</strong> command to generate a new one.</p>
|
||||
<h4><a class="anchor" href="#botfather-commands" id="botfather-commands" name="botfather-commands"><i class="anchor-icon"></i></a>Botfather commands</h4>
|
||||
<h4><a class="anchor" name="botfather-commands" href="#botfather-commands"><i class="anchor-icon"></i></a>Botfather commands</h4>
|
||||
<p>The remaining commands are pretty self-explanatory:</p>
|
||||
<ul>
|
||||
<li><strong>/mybots</strong> — returns a list of your bots with handy controls to edit their settings</li>
|
||||
<li><strong>/mybots</strong> — returns a list of your bots with handy controls to edit their settings</li>
|
||||
<li><strong>/mygames</strong> — does the same for your games</li>
|
||||
</ul>
|
||||
<p><strong>Edit bots</strong></p>
|
||||
<ul>
|
||||
<li><strong>/setname</strong> – change your bot's name.</li>
|
||||
<li><strong>/setdescription</strong> — change the bot's <strong>description</strong>, a short text of up to 512 characters, describing your bot. Users will see this text at the beginning of the conversation with the bot, titled 'What can this bot do?'.</li>
|
||||
<li><strong>/setabouttext</strong> — change the bot's <strong>about info</strong>, an even shorter text of up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text is sent together with the link.</li>
|
||||
<li><strong>/setuserpic</strong> — change the bot's profile pictures. It's always nice to put a face to a name.</li>
|
||||
<li><strong>/setcommands</strong> — change the list of commands supported by your bot. Users will see these commands as suggestions when they type <code>/</code> in the chat with your bot. Each command has a name (must start with a slash ‘/’, alphanumeric plus underscores, no more than 32 characters, case-insensitive), parameters, and a text description. Users will see the list of commands whenever they type '/' in a conversation with your bot.</li>
|
||||
<li><strong>/setname</strong> – change your bot's name.</li>
|
||||
<li><strong>/setdescription</strong> — change the bot's <strong>description</strong>, a short text of up to 512 characters, describing your bot. Users will see this text at the beginning of the conversation with the bot, titled 'What can this bot do?'.</li>
|
||||
<li><strong>/setabouttext</strong> — change the bot's <strong>about info</strong>, an even shorter text of up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text is sent together with the link.</li>
|
||||
<li><strong>/setuserpic</strong> — change the bot's profile pictures. It's always nice to put a face to a name.</li>
|
||||
<li><strong>/setcommands</strong> — change the list of commands supported by your bot. Users will see these commands as suggestions when they type <code>/</code> in the chat with your bot. Each command has a name (must start with a slash ‘/’, alphanumeric plus underscores, no more than 32 characters, case-insensitive), parameters, and a text description. Users will see the list of commands whenever they type '/' in a conversation with your bot.</li>
|
||||
<li><strong>/deletebot</strong> — delete your bot and free its username.</li>
|
||||
</ul>
|
||||
<p><strong>Edit settings</strong></p>
|
||||
|
@ -308,30 +321,30 @@
|
|||
<ul>
|
||||
<li><strong>/newgame</strong> — create a new <a href="/bots/games">game</a>.</li>
|
||||
<li><strong>/listgames</strong> — get a list of your games.</li>
|
||||
<li><strong>/editgame</strong> — edit a game.</li>
|
||||
<li><strong>/editgame</strong> — edit a game.</li>
|
||||
<li><strong>/deletegame</strong> — delete an existing game.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Please note, that it may take <strong>a few minutes</strong> for changes to take effect.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#status-alerts" id="status-alerts" name="status-alerts"><i class="anchor-icon"></i></a>Status alerts</h4>
|
||||
<h4><a class="anchor" name="status-alerts" href="#status-alerts"><i class="anchor-icon"></i></a>Status alerts</h4>
|
||||
<p>Millions choose Telegram for its speed. To stay competitive in this environment, your bot also needs to be responsive. In order to help developers keep their bots in shape, Botfather will send status alerts if it sees something is wrong.</p>
|
||||
<p>We will be checking the number of replies and the request/response conversion rate for popular bots (~300 requests per minute: but don't write this down as the value may change in the future). If we get abnormally low readings, you will receive a notification from Botfather.</p>
|
||||
<h5><a class="anchor" href="#responding-to-alerts" id="responding-to-alerts" name="responding-to-alerts"><i class="anchor-icon"></i></a>Responding to alerts</h5>
|
||||
<p>By default, you will only get one alert per bot per hour. Each alert has the following buttons:</p>
|
||||
<p>We will be checking the number of replies and the request/response conversion rate for popular bots (~300 requests per minute: but don't write this down as the value may change in the future). If we get abnormally low readings, you will receive a notification from Botfather.</p>
|
||||
<h5><a class="anchor" name="responding-to-alerts" href="#responding-to-alerts"><i class="anchor-icon"></i></a>Responding to alerts</h5>
|
||||
<p>By default, you will only get one alert per bot per hour. Each alert has the following buttons:</p>
|
||||
<ul>
|
||||
<li><strong>Fixed.</strong> Use this if you found an issue with your bot and fixed it. If you press the fix button, we will resume sending alerts in the regular way so that you can see if your fix worked within 5-10 minutes instead of having to wait for an hour.</li>
|
||||
<li><strong>Support.</strong> Use this to open a chat with <a href="https://t.me/botsupport">@BotSupport</a> if you don't see any issues with your bot or if you think the problem is on our side.</li>
|
||||
<li><strong>Mute for 8h/1w.</strong> Use this if you can't fix your bot at the moment. This will disable all alerts for the bot in question for the specified period of time. We do not recommend using this option since your users may migrate to a more stable bot. You can unmute alerts in your bot's settings via Botfather.</li>
|
||||
<li><strong>Support.</strong> Use this to open a chat with <a href="https://t.me/botsupport">@BotSupport</a> if you don't see any issues with your bot or if you think the problem is on our side.</li>
|
||||
<li><strong>Mute for 8h/1w.</strong> Use this if you can't fix your bot at the moment. This will disable all alerts for the bot in question for the specified period of time. We do not recommend using this option since your users may migrate to a more stable bot. You can unmute alerts in your bot's settings via Botfather.</li>
|
||||
</ul>
|
||||
<h5><a class="anchor" href="#monitored-issues" id="monitored-issues" name="monitored-issues"><i class="anchor-icon"></i></a>Monitored issues</h5>
|
||||
<h5><a class="anchor" name="monitored-issues" href="#monitored-issues"><i class="anchor-icon"></i></a>Monitored issues</h5>
|
||||
<p>We will currently notify you about the following issues:</p>
|
||||
<p><strong>1.</strong></p>
|
||||
<pre><code>Too few **private messages** are sent compared to previous weeks: **{value}**</code></pre>
|
||||
<p>Your bot is sending much fewer messages than it did in the previous weeks. This is useful for newsletter-style bots that send out messages without prompts from the users. The larger the value, the more significant the difference. </p>
|
||||
<p><strong>2.</strong></p>
|
||||
<pre><code>Too few replies to incoming **private messages**. Conversion rate: **{value}**</code></pre>
|
||||
<p>Your bot is not replying to all messages that are being sent to it (the request/response conversion rate for your bot was too low for at least two of the last three 5-minute periods). To provide a good user experience, please respond to all messages that are sent to your bot. Respond to <em>message</em> <a href="https://core.telegram.org/bots/api#update">updates</a> by calling <em>send...</em> methods (e.g. <a href="https://core.telegram.org/bots/api#sendmessage">sendMessage</a>).</p>
|
||||
<p>Your bot is not replying to all messages that are being sent to it (the request/response conversion rate for your bot was too low for at least two of the last three 5-minute periods). To provide a good user experience, please respond to all messages that are sent to your bot. Respond to <em>message</em> <a href="https://core.telegram.org/bots/api#update">updates</a> by calling <em>send…</em> methods (e.g. <a href="https://core.telegram.org/bots/api#sendmessage">sendMessage</a>).</p>
|
||||
<p><strong>3.</strong></p>
|
||||
<pre><code>Too few answers to **inline queries**. Conversion rate: **{value}**</code></pre>
|
||||
<p>Your bot is not replying to all inline queries that are being sent to it, calculated in the same way as above. Respond to <em>inline_query</em> <a href="https://core.telegram.org/bots/api#update">updates</a> by calling <a href="/bots/api#answerinlinequery">answerInlineQuery</a>.</p>
|
||||
|
@ -343,8 +356,9 @@ Too few answers to **callback game queries**. Conversion rate: **{value}**</code
|
|||
<p>Please note that the status alerts feature is still being tested and will be improved in the future.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<p>That's it for the introduction. You are now definitely ready to proceed to the <a href="/bots/api"><strong>BOT API MANUAL</strong></a>.</p>
|
||||
<p>If you've got any questions, please check out our <a href="/bots/faq"><strong>Bot FAQ »</strong></a></p></div>
|
||||
<p>That's it for the introduction. You are now definitely ready to proceed to the <a href="/bots/api"><strong>BOT API MANUAL</strong></a>.</p>
|
||||
<p>If you've got any questions, please check out our <a href="/bots/faq"><strong>Bot FAQ »</strong></a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue