Don't delete guild data when guild becomes unavailable
This commit is contained in:
parent
b6ff149d51
commit
9a6b65f3a3
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "reminder-rs"
|
||||
version = "1.7.26"
|
||||
version = "1.7.27"
|
||||
authors = ["Jude Southworth <judesouthworth@pm.me>"]
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0 only"
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user