Update README.md

This commit is contained in:
Temirkhan Myrzamadi 2020-02-13 20:03:23 +06:00 committed by GitHub
parent ddc0b69481
commit 18588850f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,13 +45,9 @@ async fn main() {
}
async fn run() {
// Configure the fancy logger.
std::env::set_var("RUST_LOG", "info");
pretty_env_logger::init();
let bot = Bot::from_env().enable_logging(crate_name!()).build();
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
// each incoming message.
Dispatcher::<RequestError>::new(bot)