p4bl0t/src/main.rs

26 lines
534 B
Rust
Raw Permalink Normal View History

#![warn(clippy::style, clippy::pedantic)]
2023-11-22 21:38:21 +01:00
mod db;
mod discord;
mod utils;
2023-11-22 21:38:21 +01:00
use std::error::Error;
use tracing::info;
2023-11-22 21:38:21 +01:00
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
println!("Setting logging up");
2023-11-22 21:38:21 +01:00
utils::setup_logging();
info!("Setting up color_eyre");
color_eyre::install()?;
info!("Reading from dotenv");
let _ =
dotenvy::dotenv().map_err(|_| info!("No .env file found, skipping"));
info!("Launching bot");
let bot = discord::make_bot();
2023-11-22 21:38:21 +01:00
bot.run().await?;
Ok(())
}