create basic telegram bot

This commit is contained in:
Akulij 2025-03-30 18:01:05 +08:00
parent 82e86e2974
commit 13d66bc41a

View File

@ -1,3 +1,12 @@
fn main() {
println!("Hello, world!");
use teloxide::prelude::*;
#[tokio::main]
async fn main() {
let bot = Bot::from_env();
teloxide::repl(bot, |bot: Bot, msg: Message| async move {
bot.send_dice(msg.chat.id).await?;
Ok(())
})
.await;
}