feat: now using seperate tables for key info, joined when needed

This commit is contained in:
silver 2023-09-17 00:14:50 +01:00
parent f405cbbb93
commit 591c61b009
6 changed files with 225 additions and 198 deletions

View file

@ -4,14 +4,16 @@ use serenity::{
async_trait,
client::{Context, EventHandler},
model::{
application::{
command::Command,
interaction::{Interaction, InteractionResponseType},
},
gateway::{GatewayIntents, Ready},
guild,
application::{interaction::{Interaction, InteractionResponseType}, command::Command},
},
Client,
};
use std::sync::Arc;
use serenity::model::prelude::interaction;
use skynet_discord_bot::{db_init, get_config, get_server_config, get_server_member, Config, DataBase};
use tokio::sync::RwLock;
@ -56,13 +58,11 @@ impl EventHandler for Handler {
async fn ready(&self, ctx: Context, ready: Ready) {
println!("[Main] {} is connected!", ready.user.name);
Command::set_global_application_commands(&ctx.http, |commands| {
commands
.create_application_command(|command| commands::link_email::register(command))
commands.create_application_command(|command| commands::link_email::register(command))
})
.await.ok();
.await
.ok();
}
async fn interaction_create(&self, ctx: Context, interaction: Interaction) {