# TdApi.MessageDice (tdlight API 3.3.160 API)
declaration: package: it.tdlight.jni, class: TdApi, class: MessageDice

Package it.tdlight.jni

# Class TdApi.MessageDice

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.MessageContent
it.tdlight.jni.TdApi.MessageDice

Enclosing class:
  TdApi

    public static class TdApi.MessageDice
    extends TdApi.MessageContent

A dice message. The dice value is randomly generated by the server.

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`static int` | `CONSTRUCTOR` |
`String` | `emoji` | Emoji on which the dice throw animation is based.
`TdApi.DiceStickers` | `finalState` | The animated stickers with the final dice animation; may be null if unknown.
`TdApi.DiceStickers` | `initialState` | The animated stickers with the initial dice animation; may be null if unknown.
`int` | `successAnimationFrameNumber` | Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded.
`int` | `value` | The dice value.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`MessageDice()` | A dice message.
`MessageDice​(TdApi.DiceStickers initialState, TdApi.DiceStickers finalState, String emoji, int value, int successAnimationFrameNumber)` | A dice message.
`MessageDice​(DataInput input)` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`boolean` | `equals​(Object o)` |
`int` | `getConstructor()` |
`int` | `hashCode()` |
`void` | `serialize​(DataOutput output)` |

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### initialState

public TdApi.DiceStickers initialState
The animated stickers with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known.

### finalState

public TdApi.DiceStickers finalState
The animated stickers with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known.

### emoji

public String emoji
Emoji on which the dice throw animation is based.

### value

public int value
The dice value. If the value is 0, the dice don't have final state yet.

### successAnimationFrameNumber

public int successAnimationFrameNumber
Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### MessageDice

public MessageDice()
A dice message. The dice value is randomly generated by the server.

### MessageDice

public MessageDice​(TdApi.DiceStickers initialState, TdApi.DiceStickers finalState, String emoji, int value, int successAnimationFrameNumber)
A dice message. The dice value is randomly generated by the server.

Parameters:
  `initialState` - DiceStickers The animated stickers with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known.
  `finalState` - DiceStickers The animated stickers with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known.
  `emoji` - String Emoji on which the dice throw animation is based.
  `value` - int The dice value. If the value is 0, the dice don't have final state yet.
  `successAnimationFrameNumber` - int Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded.

### MessageDice

public MessageDice​(DataInput input) throws IOException

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize​(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals​(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`