feat: split out all the databse interactions into their own file

This commit is contained in:
silver 2024-10-28 00:59:04 +00:00
parent 79f880daea
commit 41407ecefb
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
12 changed files with 348 additions and 318 deletions

View file

@ -3,19 +3,20 @@ pub mod commands;
use crate::commands::role_adder::tools::on_role_change;
use serenity::model::guild::Member;
use serenity::{
async_trait,
client::{Context, EventHandler},
model::{
application::{command::Command, interaction::Interaction},
gateway::{GatewayIntents, Ready},
prelude::Activity,
user::OnlineStatus,
},
Client,
async_trait,
client::{Context, EventHandler},
model::{
application::{command::Command, interaction::Interaction},
gateway::{GatewayIntents, Ready},
prelude::Activity,
user::OnlineStatus,
},
Client,
};
use skynet_discord_bot::{db_init, get_config, get_server_config, get_server_member, Config, DataBase};
use skynet_discord_bot::{get_config, Config};
use std::sync::Arc;
use tokio::sync::RwLock;
use skynet_discord_bot::common::database::{db_init, get_server_config, get_server_member, DataBase};
struct Handler;