feat: split out all the databse interactions into their own file
This commit is contained in:
parent
79f880daea
commit
41407ecefb
12 changed files with 348 additions and 318 deletions
|
@ -13,8 +13,10 @@ use serenity::{
|
|||
prelude::{command::CommandOptionType, interaction::application_command::CommandDataOptionValue},
|
||||
},
|
||||
};
|
||||
use skynet_discord_bot::{get_now_iso, random_string, Config, DataBase, Wolves, WolvesVerify};
|
||||
use skynet_discord_bot::{get_now_iso, random_string, Config};
|
||||
use sqlx::{Pool, Sqlite};
|
||||
use skynet_discord_bot::common::database::{DataBase, Wolves, WolvesVerify};
|
||||
|
||||
pub mod link {
|
||||
use super::*;
|
||||
|
||||
|
@ -238,8 +240,9 @@ pub mod verify {
|
|||
use super::*;
|
||||
use crate::commands::link_email::link::{db_pending_clear_expired, get_verify_from_db};
|
||||
use serenity::model::user::User;
|
||||
use skynet_discord_bot::{get_server_config, ServerMembersWolves, Servers};
|
||||
use skynet_discord_bot::common::database::get_server_config;
|
||||
use sqlx::Error;
|
||||
use skynet_discord_bot::common::database::{ServerMembersWolves, Servers};
|
||||
|
||||
pub async fn run(command: &ApplicationCommandInteraction, ctx: &Context) -> String {
|
||||
let db_lock = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue