DEV Community

Ishan Rayeen
Ishan Rayeen

Posted on

4

Sending Media Files | Telegram Bot Development | Part 4

Telegram bot development using node.js and Telegraf API.

What you will learn:

  • Creating a start script.
  • Using Nodemon
  • Sending Media Files.
  • 3 methods of sending the media files
  • Sending Location.
  • And a lot more...

Requirements:

  • Please watch previous parts
  • Basic Programming (everything will be taught from basics).
  • Telegram Account.

Example Bot:
Search for @covid_19_india_bot on telegram or click here
https://t.me/covid_19_india_bot

Top comments (1)

Collapse
 
klaukele profile image
klaukele

Thank you, Ishan so much for this valuable information! Loved this series of videos great job!
I have one question, when using sendMediaGroup I figured I can't add audio and photo together...is there a way how to fix this? Below is the code I wrote but it won't work...

ctx.telegram.sendMediaGroup(ctx.chat.id,[
{
type:'photo',
media:{
source:'images/image1.jpg'
}
},
{
type:'audio',
media:{
source:'audio/audio1.jpg'
}
}

Thank you in advance for your time!

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay