This commit is contained in:
2026-03-25 21:38:34 +00:00
parent 86c150dff1
commit ba4a702574
10 changed files with 128 additions and 118 deletions
+1
View File
@@ -8,3 +8,4 @@ default-run = "bot"
serenity = "0.12"
tokio = {workspace = true}
sea-orm = {workspace = true}
migration ={workspace = true}
+2
View File
@@ -1,6 +1,7 @@
use std::env;
use std::error::Error;
use migration::{Migrator, MigratorTrait};
use sea_orm::{Database, DatabaseConnection};
use serenity::async_trait;
use serenity::model::channel::Message;
@@ -25,6 +26,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment");
let dbc: DatabaseConnection = Database::connect("sqlite::memory:").await?;
Migrator::up(&dbc, None).await?;
// Set gateway intents, which decides what events the bot will be notified about
let intents = GatewayIntents::GUILD_MESSAGES