Don't delete guild data when guild becomes unavailable
This commit is contained in:
parent
b6ff149d51
commit
9a6b65f3a3
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "reminder-rs"
|
name = "reminder-rs"
|
||||||
version = "1.7.26"
|
version = "1.7.27"
|
||||||
authors = ["Jude Southworth <judesouthworth@pm.me>"]
|
authors = ["Jude Southworth <judesouthworth@pm.me>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "AGPL-3.0 only"
|
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, .. } => {
|
FullEvent::GuildDelete { incomplete, .. } => {
|
||||||
let _ = sqlx::query!("DELETE FROM guilds WHERE guild = ?", incomplete.id.get())
|
if !incomplete.unavailable {
|
||||||
.execute(&data.database)
|
let _ = sqlx::query!("DELETE FROM guilds WHERE guild = ?", incomplete.id.get())
|
||||||
.await;
|
.execute(&data.database)
|
||||||
|
.await;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
FullEvent::InteractionCreate { interaction } => {
|
FullEvent::InteractionCreate { interaction } => {
|
||||||
if let Some(component) = interaction.clone().message_component() {
|
if let Some(component) = interaction.clone().message_component() {
|
||||||
|
Loading…
Reference in New Issue
Block a user