Placeholder while updating query

This commit is contained in:
2024-12-21 21:36:05 -05:00
parent ceea975836
commit 7718cf19c3
17 changed files with 298 additions and 33 deletions

View File

@@ -23,6 +23,7 @@ pub struct BotHandler {
pub oai: Option<OAI>,
}
static REGISTERED: OnceLock<bool> = OnceLock::new();
static SONGBIRD: OnceLock<Arc<Songbird>> = OnceLock::new();
static CLIENT: OnceLock<reqwest::Client> = OnceLock::new();
@@ -104,6 +105,13 @@ impl EventHandler for BotHandler {
CLIENT.set(http_client).ok();
}
// Update registered to prevent reloading the commands
if REGISTERED.get().is_some() {
return;
} else {
REGISTERED.set(true).ok();
}
log::trace!("Handling {} guilds", ready.guilds.len());
for guild in ready.guilds {
// Check if guild exists in database