diff --git a/Cargo.toml b/Cargo.toml index 7e1192a..6526a94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder-rs" -version = "1.7.26" +version = "1.7.27" authors = ["Jude Southworth "] edition = "2021" license = "AGPL-3.0 only" diff --git a/src/event_handlers.rs b/src/event_handlers.rs index 80cc258..4fb5347 100644 --- a/src/event_handlers.rs +++ b/src/event_handlers.rs @@ -55,9 +55,11 @@ To stay up to date on the latest features and fixes, join our [Discord](https:// } } FullEvent::GuildDelete { incomplete, .. } => { - let _ = sqlx::query!("DELETE FROM guilds WHERE guild = ?", incomplete.id.get()) - .execute(&data.database) - .await; + if !incomplete.unavailable { + let _ = sqlx::query!("DELETE FROM guilds WHERE guild = ?", incomplete.id.get()) + .execute(&data.database) + .await; + } } FullEvent::InteractionCreate { interaction } => { if let Some(component) = interaction.clone().message_component() {