create basic telegram bot
This commit is contained in:
parent
82e86e2974
commit
13d66bc41a
13
src/main.rs
13
src/main.rs
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user