Placeholder while updating query
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user