initial commit

This commit is contained in:
2023-11-22 21:38:21 +01:00
commit 47dd2b02c4
15 changed files with 3534 additions and 0 deletions

17
src/discord/utils.rs Normal file
View File

@@ -0,0 +1,17 @@
use crate::db::Database;
pub use poise::serenity_prelude as serenity;
pub struct BotData {
database: Database,
}
impl BotData {
pub async fn new() -> color_eyre::Result<Self> {
Ok(Self {
database: Database::new().await?,
})
}
}
pub type Error = Box<dyn std::error::Error + Send + Sync>;
pub type Context<'a> = poise::Context<'a, BotData, Error>;