Open salicius opened 2 months ago
To send a document you need to pass inputMessageDocument
as input_message_content
to sendMessage
.
To send a document you need to pass
inputMessageDocument
asinput_message_content
tosendMessage
.
sorry but i cant find it in https://core.telegram.org/bots/api#sendmessage, could you do an example please?
In Bot API you can use https://core.telegram.org/bots/api#senddocument.
In Bot API you can use https://core.telegram.org/bots/api#senddocument.
yes but in this way i have to use two different methods sendMessage and sendDocument, while i'd like use a single sendMessage and attach a document if it's possible. With sendDocument i can't send even a message, just a caption and i can't choose to put the document above or below the message
sendMessage Use this method to send text messages.
sendDocument Use this method to send general files.
sendMessage Use this method to send text messages.
sendDocument Use this method to send general files.
ok thanks, i know that. i'm saying if i can add an attachment file to sendMessage instead using two different methods and choose to put it above or below the message text like the link preview:
See link_preview_options
parameter. If the document is small enough it can be seen in link preview.
thanks, but as he said i can't use that in sendDocument to decide whether to place it above or below
Currently, caption is always shown below the corresponding document.
Hi, how can i attach a document with the sendMessage method ?