use thiserror::Error;
#[derive(Debug, Error)]
pub enum BotError {
#[error("API error: {0}")]
Api(#[from] rustigram_api::Error),
#[error("Handler error: {0}")]
Handler(#[from] anyhow::Error),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Dispatcher shut down")]
Shutdown,
}
pub type BotResult<T> = std::result::Result<T, BotError>;