api.sendMessage()
Sends a message. Returns the sent message
Parameters
SendMessageParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
chatId | number | Target chat |
messageThreadId | number | If not 0, a message thread identifier in which the message will be sent |
replyToMessageId | number | Identifier of the message to reply to or 0 |
options | Options to be used to send the message; pass null to use default options | |
replyMarkup | Markup for replying to the message; pass null if none; for bots only | |
inputMessageContent | The content of the message to be sent |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'sendMessage' | 'error'
airgram: Airgram
request: {
method: 'sendMessage'
params: SendMessageParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}