2024-07-04 01:15:39 +00:00
|
|
|
use anyhow::{Context, Result};
|
2024-07-04 22:47:10 +00:00
|
|
|
use teloxide::dispatching::HandlerExt;
|
2024-07-04 01:15:39 +00:00
|
|
|
|
2024-07-04 22:47:10 +00:00
|
|
|
pub(crate) mod database;
|
2024-07-04 01:15:39 +00:00
|
|
|
mod telegram;
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> Result<()> {
|
2024-07-04 22:47:10 +00:00
|
|
|
// Logging setup
|
|
|
|
{
|
|
|
|
pretty_env_logger::init();
|
|
|
|
log::info!("Logging initialized successfully!");
|
|
|
|
}
|
|
|
|
// Telegram setup
|
|
|
|
{
|
|
|
|
log::trace!("Setting up Telegram bot...");
|
|
|
|
let mut dispatcher = telegram::dispatcher();
|
|
|
|
dispatcher.dispatch().await
|
|
|
|
}
|
2024-07-04 01:15:39 +00:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|