<p>On startup, clients should fetch the animated emoji stickerset by calling the <ahref="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing <ahref="/constructor/inputStickerSetAnimatedEmoji">inputStickerSetAnimatedEmoji</a> to the <code>stickerset</code> field.<br>
The returned stickerset will contain a set of animated stickers, one for each of the supported emojis. </p>
<p>Clients should substitute messages containing only one instance of one of the allowed emojis with the respective animated sticker.<br>
Also, when receiving messages containing only one instance of a <ahref="/api/custom-emoji">custom emoji</a>, instead of displaying a message bubble with a single small custom emoji inside, the scaled-up custom emoji should be displayed directly, like with normal stickers. </p>
<p>Animated emojis should loop only once when first sent or received, or when clicked.<br>
For <ahref="#emoji-reactions">supported emojis</a>, clients on both sides of private chats with users are supposed to show a reaction animation when any of the two users clicks on the animated emoji: <ahref="#emoji-reactions">click here for more info »</a>.</p>
<p>For special <ahref="/api/dice">dice emojis</a> like <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB2.png"width="20"height="20"alt="🎲"/>, <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EAF.png"width="20"height="20"alt="🎯"/>, or <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8F80.png"width="20"height="20"alt="🏀"/>, clients are supposed to behave differently both when sending and receiving such emojis: <ahref="/api/dice">click here for more info »</a>.</p>
<h3><aclass="anchor"href="#emojis-with-sounds"id="emojis-with-sounds"name="emojis-with-sounds"><iclass="anchor-icon"></i></a>Emojis with sounds</h3>
<p>Certain animated emojis should play sound when clicked, as specified by <ahref="/api/config#client-configuration">server-side configuration</a>. </p>
<p>The returned JSON object will contain the following map, with a list of file IDs to download:</p>
<p>Not to be confused with <ahref="/api/reactions">message reactions »</a>. </p>
<p>On startup, clients should fetch the animated reaction emoji stickerset by calling the <ahref="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing <ahref="/constructor/inputStickerSetAnimatedEmojiAnimations">inputStickerSetAnimatedEmojiAnimations</a> to the <code>stickerset</code> field.<br>
The returned stickerset will contain a set of animated emoji reactions, <em>one or more</em> for each of the supported emojis.<br>
If a set of reactions for the <imgclass="emoji"src="//telegram.org/img/emoji/40/E29DA4.png"width="20"height="20"alt="❤"/> emoji is returned, the same reactions should also be assigned to the <imgclass="emoji"src="//telegram.org/img/emoji/40/F09FA7A1.png"width="20"height="20"alt="🧡"/>, <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F929B.png"width="20"height="20"alt="💛"/>, <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F929A.png"width="20"height="20"alt="💚"/>, <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F9299.png"width="20"height="20"alt="💙"/>, <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F929C.png"width="20"height="20"alt="💜"/>, <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F96A4.png"width="20"height="20"alt="🖤"/>, <imgclass="emoji"src="//telegram.org/img/emoji/40/F09FA48D.png"width="20"height="20"alt="🤍"/> and <imgclass="emoji"src="//telegram.org/img/emoji/40/F09FA48E.png"width="20"height="20"alt="🤎"/> emojis. </p>
<p>Clients on both sides of private chats with users should overlay one of the appropriate reaction animations over the animated sticker when any of the two users clicks on a supported animated emoji.<br>
The same should happen for standalone <ahref="/api/custom-emoji">custom emojis</a> (single <ahref="/api/custom-emoji">custom emojis</a> are always displayed as standalone stickers) if the underlying normal emoji is supported (as above).<br>
The reaction animation for each separate tap should be chosen randomly from all the available reactions for a given emoji, and multiple taps should be aggregated and sent to the other user as follows: </p>
<p>At each tap, clients should store all occurred taps in a local list.<br>
After 1 second has elapsed with no more taps, the local list should be cleared and stored taps should be sent using <ahref="/method/messages.setTyping">messages.setTyping</a>, passing a <ahref="/constructor/sendMessageEmojiInteraction">sendMessageEmojiInteraction</a> constructor with the following fields: </p>
<ul>
<li><code>emoticon</code> - The emoji we're reacting to</li>
<li><code>msg_id</code> - Message ID of the animated emoji that was clicked</li>
<li><code>interaction</code> - A JSON object with interaction info, containing the following keys:<ul>
<li><code>v</code> - An integer indicating the object version, currently <code>1</code></li>
<li><code>a</code> - An array of JSON objects, each containing the following keys:<ul>
<li><code>t</code> - float, number of seconds that passed since the previous tap in the array, the first tap uses a value of <code>0.0</code>.</li>
<li><code>i</code> - integer, 1-based index of the randomly chosen animation for the tap (equivalent to the index of a specific emoji-related animation in <ahref="/constructor/stickerPack">stickerPack</a> + 1).</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>1 second after the receiving user has seen the last reaction animation for a specific emoji, an acknowledgement must be sent using <ahref="/method/messages.setTyping">messages.setTyping</a>, passing a <ahref="/constructor/sendMessageEmojiInteractionSeen">sendMessageEmojiInteractionSeen</a> with that emoji.</p></div>
</div>
</div>
</div>
<divclass="footer_wrap">
<divclass="footer_columns_wrap footer_desktop">
<divclass="footer_column footer_column_telegram">
<h5>Telegram</h5>
<divclass="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.