This happens when we receive a tweet that contains an video and attempt to send it to Telegram as a photo message. We need to check the received data shape from the Twitter API to determine whatmedia is sent, we account for photos but we need to check of the data shape contains a video, if so we can send a video message and not a photo message.
In our types, we will need to create another interface that takes a videoUrl like our IInlineKeyboardWithPhoto. Next, we will need to create a function that builds the video mesage, like our sendMessageWithPhoto . Finally, add some logic here to build a video message
Error:
This happens when we receive a tweet that contains an video and attempt to send it to Telegram as a photo message. We need to check the received data shape from the Twitter API to determine what
media
is sent, we account for photos but we need to check of the data shape contains a video, if so we can send a video message and not a photo message.Telegram video message: https://core.telegram.org/bots/api#sendvideo
In our types, we will need to create another interface that takes a
videoUrl
like ourIInlineKeyboardWithPhoto
. Next, we will need to create a function that builds the video mesage, like our sendMessageWithPhoto . Finally, add some logic here to build a video message