25 lines
671 B
Rust
25 lines
671 B
Rust
use client::DiscordClient;
|
|
|
|
mod checks;
|
|
mod client;
|
|
mod commands;
|
|
|
|
pub mod prelude {
|
|
pub use poise::serenity_prelude as serenity;
|
|
pub struct KBotData {}
|
|
pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
|
pub type Context<'a> = poise::Context<'a, KBotData, Error>;
|
|
pub type CommandResult = Result<(), Error>;
|
|
pub use tracing::{debug, error, info, trace, warn};
|
|
}
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
tracing_subscriber::fmt::init();
|
|
|
|
dotenv::dotenv().ok();
|
|
|
|
let token = std::env::var("DISCORD_TOKEN").expect("missing DISCORD_TOKEN");
|
|
let client = DiscordClient::new(&token).await;
|
|
client.unwrap().start().await.unwrap();
|
|
}
|