diff --git a/Cargo.lock b/Cargo.lock index 17e83b9..abe0811 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1316,7 +1316,7 @@ dependencies = [ [[package]] name = "reminder_rs" -version = "1.3.1" +version = "1.3.2" dependencies = [ "Inflector", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index e011a7d..fae2274 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder_rs" -version = "1.3.1" +version = "1.3.2" authors = ["jellywx "] edition = "2018" diff --git a/src/framework.rs b/src/framework.rs index 72cdbfa..7cb6817 100644 --- a/src/framework.rs +++ b/src/framework.rs @@ -357,8 +357,17 @@ impl Framework for RegexFramework { .get::() .cloned() .expect("Could not get SQLPool from data"); + { + let guild = GuildData::from_guild(guild.clone(), &pool).await.unwrap(); - GuildData::from_guild(guild, &pool).await; + let _ = sqlx::query!( + "UPDATE channels SET guild_id = ? WHERE channel = ?", + guild.id, + msg.channel_id.as_u64(), + ) + .execute(&pool) + .await; + } if let Some(full_match) = self.command_matcher.captures(&msg.content) { if check_prefix(&ctx, &guild, full_match.name("prefix")).await {