send_mediagroup/
send_mediagroup.rs1use telebot::{Bot, file::File};
2use futures::stream::Stream;
3use std::env;
4
5use telebot::functions::*;
7
8fn main() {
9 let mut bot = Bot::new(&env::var("TELEGRAM_BOT_KEY").unwrap()).update_interval(200);
11
12 let handle = bot.new_cmd("/send_mediagroup")
13 .and_then(|(bot, msg)| {
14 bot.mediagroup(msg.chat.id)
15 .file(File::Url("https://upload.wikimedia.org/wikipedia/commons/f/f4/Honeycrisp.jpg".into()))
16 .file(File::Url("https://upload.wikimedia.org/wikipedia/en/3/3e/Pooh_Shepard1928.jpg".into()))
17 .file("examples/bee.jpg")
18 .send()
19 })
20 .for_each(|_| Ok(()));
21
22 bot.run_with(handle);
24}