Package org.drinkless.tdlib

# Class TdApi.MessageSendOptions

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.MessageSendOptions

Enclosing class:
  `TdApi`

public static class TdApi.MessageSendOptions extends TdApi.Object
Options to be used when a message is sent.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `boolean`
  `allowPaidBroadcast`
  Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `boolean`
  `disableNotification`
  Pass true to disable notification for the message.
  `long`
  `effectId`
  Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats.
  `boolean`
  `fromBackground`
  Pass true if the message is sent from the background.
  `boolean`
  `onlyPreview`
  Pass true to get a fake message instead of actually sending them.
  `long`
  `paidMessageStarCount`
  The number of Telegram Stars the user agreed to pay to send the messages.
  `boolean`
  `protectContent`
  Pass true if the content of the message must be protected from forwarding and saving; for bots only.
  `TdApi.MessageSchedulingState`
  `schedulingState`
  Message scheduling state; pass null to send message immediately.
  `int`
  `sendingId`
  Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
  `TdApi.InputSuggestedPostInfo`
  `suggestedPostInfo`
  Information about the suggested post; pass null if none.
  `boolean`
  `updateOrderOfInstalledStickerSets`
  Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MessageSendOptions()`
  Options to be used when a message is sent.
  `MessageSendOptions(TdApi.InputSuggestedPostInfo suggestedPostInfo, boolean disableNotification, boolean fromBackground, boolean protectContent, boolean allowPaidBroadcast, long paidMessageStarCount, boolean updateOrderOfInstalledStickerSets, TdApi.MessageSchedulingState schedulingState, long effectId, int sendingId, boolean onlyPreview)`
  Options to be used when a message is sent.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### suggestedPostInfo

    public TdApi.InputSuggestedPostInfo suggestedPostInfo
    Information about the suggested post; pass null if none. For messages to channel direct messages chat only. Applicable only to sendMessage and addOffer.

  - ### disableNotification

    public boolean disableNotification
    Pass true to disable notification for the message.

  - ### fromBackground

    public boolean fromBackground
    Pass true if the message is sent from the background.

  - ### protectContent

    public boolean protectContent
    Pass true if the content of the message must be protected from forwarding and saving; for bots only.

  - ### allowPaidBroadcast

    public boolean allowPaidBroadcast
    Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only.

  - ### paidMessageStarCount

    public long paidMessageStarCount
    The number of Telegram Stars the user agreed to pay to send the messages.

  - ### updateOrderOfInstalledStickerSets

    public boolean updateOrderOfInstalledStickerSets
    Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.

  - ### schedulingState

    public TdApi.MessageSchedulingState schedulingState
    Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat, live location messages and self-destructing messages can't be scheduled.

  - ### effectId

    public long effectId
    Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats.

  - ### sendingId

    public int sendingId
    Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.

  - ### onlyPreview

    public boolean onlyPreview
    Pass true to get a fake message instead of actually sending them.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### MessageSendOptions

    public MessageSendOptions()
    Options to be used when a message is sent.

  - ### MessageSendOptions

    public MessageSendOptions(TdApi.InputSuggestedPostInfo suggestedPostInfo, boolean disableNotification, boolean fromBackground, boolean protectContent, boolean allowPaidBroadcast, long paidMessageStarCount, boolean updateOrderOfInstalledStickerSets, TdApi.MessageSchedulingState schedulingState, long effectId, int sendingId, boolean onlyPreview)
    Options to be used when a message is sent.
    Parameters:
      `suggestedPostInfo` - Information about the suggested post; pass null if none. For messages to channel direct messages chat only. Applicable only to sendMessage and addOffer.
      `disableNotification` - Pass true to disable notification for the message.
      `fromBackground` - Pass true if the message is sent from the background.
      `protectContent` - Pass true if the content of the message must be protected from forwarding and saving; for bots only.
      `allowPaidBroadcast` - Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only.
      `paidMessageStarCount` - The number of Telegram Stars the user agreed to pay to send the messages.
      `updateOrderOfInstalledStickerSets` - Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.
      `schedulingState` - Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat, live location messages and self-destructing messages can't be scheduled.
      `effectId` - Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats.
      `sendingId` - Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
      `onlyPreview` - Pass true to get a fake message instead of actually sending them.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Object`
    Returns:
      this.CONSTRUCTOR