feat(main): adding the emoji loading
This commit is contained in:
parent
667b7d110c
commit
1f14b44188
1 changed files with 8 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
mod commands;
|
mod commands;
|
||||||
|
mod config;
|
||||||
mod database;
|
mod database;
|
||||||
mod events;
|
mod events;
|
||||||
mod models;
|
mod models;
|
||||||
|
|
@ -10,6 +11,8 @@ use sqlx::postgres::PgPoolOptions;
|
||||||
use sqlx::{Pool, Postgres, migrate};
|
use sqlx::{Pool, Postgres, migrate};
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
|
use self::config::emoji::EmojiConfig;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
println!("\n");
|
println!("\n");
|
||||||
|
|
@ -32,7 +35,10 @@ async fn main() {
|
||||||
.run(&db)
|
.run(&db)
|
||||||
.await
|
.await
|
||||||
.expect("❌ | Failed to run migrations");
|
.expect("❌ | Failed to run migrations");
|
||||||
println!("✅ | Migrations applied\n");
|
println!("✅ | Migrations applied");
|
||||||
|
|
||||||
|
let emojis: EmojiConfig = EmojiConfig::load().expect("❌ | Failed to load emojis.toml");
|
||||||
|
println!("✅ | Emojis loaded\n");
|
||||||
|
|
||||||
let intents: GatewayIntents = GatewayIntents::AUTO_MODERATION_CONFIGURATION
|
let intents: GatewayIntents = GatewayIntents::AUTO_MODERATION_CONFIGURATION
|
||||||
| GatewayIntents::AUTO_MODERATION_EXECUTION
|
| GatewayIntents::AUTO_MODERATION_EXECUTION
|
||||||
|
|
@ -52,6 +58,7 @@ async fn main() {
|
||||||
commands: commands::import(),
|
commands: commands::import(),
|
||||||
events: events::import(),
|
events: events::import(),
|
||||||
database: db,
|
database: db,
|
||||||
|
emojis: emojis,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut client: Client = Client::builder(&token, intents)
|
let mut client: Client = Client::builder(&token, intents)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue