Module tdlight.api
Package it.tdlight.jni

# Class TdApi.SendMessage

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.Message>
it.tdlight.jni.TdApi.SendMessage

Enclosing class:
  TdApi

public static final class TdApi.SendMessage extends TdApi.Function<TdApi.Message>
Sends a message. Returns the sent message.

Returns `Message`

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`chatId`
Target chat.
`static final int`
`CONSTRUCTOR`
`TdApi.InputMessageContent`
`inputMessageContent`
The content of the message to be sent.
`long`
`messageThreadId`
If not 0, a message thread identifier in which the message will be sent.
`TdApi.MessageSendOptions`
`options`
Options to be used to send the message; pass null to use default options.
`TdApi.ReplyMarkup`
`replyMarkup`
Markup for replying to the message; pass null if none; for bots only.
`long`
`replyToMessageId`
Identifier of the message to reply to or 0.

## Constructor Summary

Constructors
Constructor
Description
`SendMessage()`
Sends a message.
`SendMessage(long chatId, long messageThreadId, long replyToMessageId, TdApi.MessageSendOptions options, TdApi.ReplyMarkup replyMarkup, TdApi.InputMessageContent inputMessageContent)`
Sends a message.
`SendMessage(DataInput input)`
Sends a message.

## 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.Function

`toString`

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

`serialize`

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

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

## Field Details

### chatId

public long chatId
Target chat.

### messageThreadId

public long messageThreadId
If not 0, a message thread identifier in which the message will be sent.

### replyToMessageId

public long replyToMessageId
Identifier of the message to reply to or 0.

### options

public TdApi.MessageSendOptions options
Options to be used to send the message; pass null to use default options.

### replyMarkup

public TdApi.ReplyMarkup replyMarkup
Markup for replying to the message; pass null if none; for bots only.

### inputMessageContent

public TdApi.InputMessageContent inputMessageContent
The content of the message to be sent.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### SendMessage

public SendMessage()
Sends a message. Returns the sent message.

Returns `Message`

### SendMessage

public SendMessage(long chatId, long messageThreadId, long replyToMessageId, TdApi.MessageSendOptions options, TdApi.ReplyMarkup replyMarkup, TdApi.InputMessageContent inputMessageContent)
Sends a message. Returns the sent message.

Returns `Message`

Parameters:
  `chatId` - long Target chat.
  `messageThreadId` - long If not 0, a message thread identifier in which the message will be sent.
  `replyToMessageId` - long Identifier of the message to reply to or 0.
  `options` - MessageSendOptions Options to be used to send the message; pass null to use default options.
  `replyMarkup` - ReplyMarkup Markup for replying to the message; pass null if none; for bots only.
  `inputMessageContent` - InputMessageContent The content of the message to be sent.

### SendMessage

public SendMessage(DataInput input) throws IOException
Sends a message. Returns the sent message.

Returns `Message`

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`