bytesnake / telebot

Write Telegram bots in Rust with Tokio and Futures
Other
212 stars 33 forks source link

how upload photo from disk ? #71

Closed robatipoor closed 5 years ago

bytesnake commented 5 years ago

You can find an example for a document here https://github.com/bytesnake/telebot/blob/master/examples/send_self.rs. The procedure is the same, you just replace the document with photo.

let handle = bot.new_cmd("/send_self")
   .and_then(|(bot, msg)| bot.photo(msg.chat.id).file("photo.png").send())
   .for_each(|_| Ok(()));

If you have further questions, please reopen the issue :)

robatipoor commented 5 years ago

thank you