mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-24 23:57:38 +01:00
Update README.md
This commit is contained in:
parent
ddc0b69481
commit
18588850f8
1 changed files with 1 additions and 5 deletions
|
@ -45,13 +45,9 @@ async fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn run() {
|
async fn run() {
|
||||||
// Configure the fancy logger.
|
let bot = Bot::from_env().enable_logging(crate_name!()).build();
|
||||||
std::env::set_var("RUST_LOG", "info");
|
|
||||||
pretty_env_logger::init();
|
|
||||||
log::info!("Starting ping_pong_bot!");
|
log::info!("Starting ping_pong_bot!");
|
||||||
|
|
||||||
let bot = Bot::new(std::env::var("TELOXIDE_TOKEN").unwrap());
|
|
||||||
|
|
||||||
// Create a dispatcher with a single message handler that answers "pong" to
|
// Create a dispatcher with a single message handler that answers "pong" to
|
||||||
// each incoming message.
|
// each incoming message.
|
||||||
Dispatcher::<RequestError>::new(bot)
|
Dispatcher::<RequestError>::new(bot)
|
||||||
|
|
Loading…
Add table
Reference in a new issue