Class SendDice


public class SendDice extends AbstractBaseRequest<SendDice,Message>
SendPoll class. Returns Message on success.
Since:
3 March 2025
See Also:
  • Constructor Details

    • SendDice

      public SendDice(Object chat_id, Api api)
      Required
      Parameters:
      chat_id - chat id
      api - api
  • Method Details

    • emoji

      public SendDice emoji(String emoji)
      Optional
      Parameters:
      emoji - Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”
      Returns:
      SendDice
    • disableNotification

      public SendDice disableNotification(boolean disable_notification)
      Optional
      Parameters:
      disable_notification - Sends the message silently. Users will receive a notification with no sound.
      Returns:
      SendDice
    • protectContent

      public SendDice protectContent(boolean protect_content)
      Optional
      Parameters:
      protect_content - Protects the contents of the sent message from forwarding
      Returns:
      SendDice
    • replyParameters

      public SendDice replyParameters(ReplyParameters reply_parameters)
      Optional
      Parameters:
      reply_parameters - Description of the message to reply to
      Returns:
      SendDice
    • replyMarkup

      public SendDice replyMarkup(Markup reply_markup)
      Optional
      Parameters:
      reply_markup - Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
      Returns:
      SendDice
    • businessConnectionId

      public SendDice businessConnectionId(String business_connection_id)
      Optional
      Parameters:
      business_connection_id - Unique identifier of the business connection on behalf of which the message will be sent
      Returns:
      SendDice
    • messageEffectId

      public SendDice messageEffectId(String message_effect_id)
      Optional
      Parameters:
      message_effect_id - Unique identifier of the message effect to be added to the message; for private chats only
      Returns:
      SendDice