mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Add teloxide::prelude
This commit is contained in:
parent
6f2abd10ef
commit
1d6a21acb0
4 changed files with 12 additions and 9 deletions
|
@ -1,14 +1,8 @@
|
|||
use teloxide::{
|
||||
dispatching::{Dispatcher, HandlerCtx},
|
||||
types::Message,
|
||||
Bot,
|
||||
};
|
||||
|
||||
use std::env;
|
||||
use teloxide::prelude::*;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
env::set_var("RUST_LOG", "ping_pong_bot=trace");
|
||||
std::env::set_var("RUST_LOG", "ping_pong_bot=trace");
|
||||
pretty_env_logger::init();
|
||||
log::info!("Starting the ping-pong bot!");
|
||||
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
//! [`SessionDispatcher`]: crate::dispatching::session::SessionDispatcher
|
||||
//! [`dispatch(Bot, Upd)`]:
|
||||
//! crate::dispatching::session::SessionDispatcher::dispatch
|
||||
//! [`SessionState::Terminate`]: crate::dispatching::session::SessionState::Terminate
|
||||
//! [`SessionState::Terminate`]:
|
||||
//! crate::dispatching::session::SessionState::Terminate
|
||||
|
||||
// TODO: examples
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ mod net;
|
|||
|
||||
mod bot;
|
||||
pub mod dispatching;
|
||||
pub mod prelude;
|
||||
pub mod requests;
|
||||
pub mod types;
|
||||
pub mod utils;
|
||||
|
|
7
src/prelude.rs
Normal file
7
src/prelude.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
//! Commonly used items.
|
||||
|
||||
pub use crate::{
|
||||
dispatching::{Dispatcher, HandlerCtx},
|
||||
types::Message,
|
||||
Bot,
|
||||
};
|
Loading…
Add table
Reference in a new issue