Then, for each dice emoji contained in the <ahref="/api/config#emojies-send-dice"><code>emojies_send_dice</code> field</a>, clients should fetch the dice emoji stickerset by calling the <ahref="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing the properly populated <ahref="/constructor/inputStickerSetDice">inputStickerSetDice</a> to the <code>stickerset</code> field.<br>
The returned stickerset will contain a set of animated stickers, one for each of the dice outcomes, plus a first looping sticker that should be shown as preview to the user before actually sending the dice. </p>
<p>If a user attempts to send a single emoji from the ones specified in <code>emojies_send_dice</code>, the dice should be sent using <ahref="/method/messages.sendMedia">messages.sendMedia</a>, providing the dice emoji to the <code>emoticon</code> field. </p>
<p>Incoming dice stickers will be received as a <ahref="/constructor/messageMediaDice">messageMediaDice</a> constructor, along with a randomly generated server-side value, ranging from 1 to the maximum allowed value for this type of dice.<br>
Clients should display the correct dice animated sticker for the specified value: since dice values start from 1, and the first animated sticker in dice stickerset is the preview, <code>value</code> can be used to directly index the <code>documents</code> sticker array from the animated stickerset. </p>
<p>The <ahref="/api/config#emojies-send-dice-success"><code>emojies_send_dice_success</code> configuration parameter</a> contains more info about dice emojis other than the basic <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB2.png"width="20"height="20"alt="🎲"/>: </p>
<p>For each of the dice emojis, a maximum "winning" value is specified, along with the frame number at which to show the fireworks <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8E86.png"width="20"height="20"alt="🎆"/>.<br>
Please note that dice animated stickers should loop only once, right after being sent/received <strong>for the first time</strong>; clicking on the dice sticker should bring up a popup, inviting the user to send a new dice of the same type. </p>
<p>Slot machine <imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB0.png"width="20"height="20"alt="🎰"/> dice stickers are implemented a bit differently: the <code>value</code> isn't used to directly index the stickers array, but is instead used as follows. </p>
<p>The <code>value</code> is composed of three 2-bit values, each indicating the animated sticker to show in the three slots, incremented by one. </p>
<p>The <code>stickers</code> array is composed as follows:</p>
<ul>
<li>0 => Slot machine background</li>
<li>1 => Slot machine winning background, to show after a winning spin</li>
<li>2 => Slot machine frame&handle to play once at the beginning</li>
<li>3 => Left slot winning 7</li>
<li>4..7 => Left slot non-winning options</li>
<li>8 => Left slot spinning animation</li>
<li>9 => Center slot winning 7</li>
<li>10..13 => Center slot non-winning options</li>
<li>14 => Center slot spinning animation</li>
<li>15 => Right slot winning 7</li>
<li>16..19 => Right slot non-winning options</li>
<li>20 => Right slot spinning animation</li>
</ul>
<p>How to play the animation (all involved stickers are to be directly overlaid on top of each other, no special placing is required): </p>