okaeiz
okaeiz

Reputation: 400

How can we send videos and GIFs with the preview in Bale messenger bot?

I am creating a chatbot in Bale messenger using this library. Currently, the files and documents can be sent if the file_id is obtained before. The code below works perfectly fine.

await callback.message.chat.send_document(document = "file_id", caption = "This is a video/GIF")

But when a GIF or a video is sent, it will be displayed in the chat as a document that you must download to watch. But the GIF should be played over and over again in the chat, so it should have a preview. Does anyone know how we can send the video with the preview? I have also tried removing the caption. It doesn't work.

Upvotes: 0

Views: 40

Answers (1)

Kian Ahmadian
Kian Ahmadian

Reputation: 23

The sendVideo method should be used for this. Also, go back to the discussion in the library for more information.

Upvotes: 1

Related Questions