fix guild ids
This commit is contained in:
parent
392e1bb65e
commit
684661af42
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1316,7 +1316,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reminder_rs"
|
name = "reminder_rs"
|
||||||
version = "1.3.1"
|
version = "1.3.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "reminder_rs"
|
name = "reminder_rs"
|
||||||
version = "1.3.1"
|
version = "1.3.2"
|
||||||
authors = ["jellywx <judesouthworth@pm.me>"]
|
authors = ["jellywx <judesouthworth@pm.me>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
@ -357,8 +357,17 @@ impl Framework for RegexFramework {
|
|||||||
.get::<SQLPool>()
|
.get::<SQLPool>()
|
||||||
.cloned()
|
.cloned()
|
||||||
.expect("Could not get SQLPool from data");
|
.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 let Some(full_match) = self.command_matcher.captures(&msg.content) {
|
||||||
if check_prefix(&ctx, &guild, full_match.name("prefix")).await {
|
if check_prefix(&ctx, &guild, full_match.name("prefix")).await {
|
||||||
|
Loading…
Reference in New Issue
Block a user