mirror of https://github.com/Trivernis/2b-rs.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
672 B
Rust
28 lines
672 B
Rust
use crate::client::get_client;
|
|
use crate::utils::logging::init_logger;
|
|
|
|
mod client;
|
|
mod commands;
|
|
mod handler;
|
|
mod messages;
|
|
mod providers;
|
|
#[macro_use]
|
|
mod utils;
|
|
|
|
pub static VERSION: &str = env!("CARGO_PKG_VERSION");
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let _ = dotenv::dotenv();
|
|
init_logger();
|
|
let mut client = get_client()
|
|
.await
|
|
.map_err(|e| tracing::error!("Failed to get client: {:?}", e))
|
|
.expect("Failed to get client");
|
|
|
|
// start listening for events by starting a single shard
|
|
if let Err(why) = client.start_autosharded().await {
|
|
tracing::error!("An error occurred while running the client: {:?}", why);
|
|
}
|
|
}
|