Compare commits

..

No commits in common. "9bf0b5d7e4ddc6f7e6b466a936d02971a01754bb" and "e7c840a4d4f57644259eadedd0699f186dc61b63" have entirely different histories.

6 changed files with 9 additions and 10 deletions

2
Cargo.lock generated
View File

@ -2431,7 +2431,7 @@ checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
[[package]] [[package]]
name = "reminder-rs" name = "reminder-rs"
version = "1.7.26" version = "1.7.24"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"chrono", "chrono",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "reminder-rs" name = "reminder-rs"
version = "1.7.27" version = "1.7.24"
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"

View File

@ -1,4 +1,5 @@
import { ChannelSelector } from "./ChannelSelector"; import { ChannelSelector } from "./ChannelSelector";
import { DateTime } from "luxon";
import { IntervalSelector } from "./IntervalSelector"; import { IntervalSelector } from "./IntervalSelector";
import { useQuery } from "react-query"; import { useQuery } from "react-query";
import { fetchGuildInfo, fetchUserInfo } from "../../api"; import { fetchGuildInfo, fetchUserInfo } from "../../api";

View File

@ -20,7 +20,7 @@ pub async fn delete_macro(
SELECT m.id SELECT m.id
FROM command_macro m FROM command_macro m
INNER JOIN guilds INNER JOIN guilds
ON guilds.id = m.guild_id ON guilds.guild = m.guild_id
WHERE guild = ? WHERE guild = ?
AND m.name = ? AND m.name = ?
", ",

View File

@ -55,12 +55,10 @@ To stay up to date on the latest features and fixes, join our [Discord](https://
} }
} }
FullEvent::GuildDelete { incomplete, .. } => { FullEvent::GuildDelete { incomplete, .. } => {
if !incomplete.unavailable {
let _ = sqlx::query!("DELETE FROM guilds WHERE guild = ?", incomplete.id.get()) let _ = sqlx::query!("DELETE FROM guilds WHERE guild = ?", incomplete.id.get())
.execute(&data.database) .execute(&data.database)
.await; .await;
} }
}
FullEvent::InteractionCreate { interaction } => { FullEvent::InteractionCreate { interaction } => {
if let Some(component) = interaction.clone().message_component() { if let Some(component) = interaction.clone().message_component() {
let component_model = ComponentDataModel::from_custom_id(&component.data.custom_id); let component_model = ComponentDataModel::from_custom_id(&component.data.custom_id);

View File

@ -68,7 +68,7 @@ impl Data {
guild_id: GuildId, guild_id: GuildId,
) -> Result<Vec<CommandMacro>, Error> { ) -> Result<Vec<CommandMacro>, Error> {
let rows = sqlx::query!( let rows = sqlx::query!(
"SELECT name, description, commands FROM command_macro WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?)", "SELECT name, description, commands FROM macro WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?)",
guild_id.get() guild_id.get()
) )
.fetch_all(&self.database) .fetch_all(&self.database)
@ -76,7 +76,7 @@ impl Data {
guild_id, guild_id,
name: row.name.clone(), name: row.name.clone(),
description: row.description.clone(), description: row.description.clone(),
commands: serde_json::from_str(&row.commands.to_string()).unwrap(), commands: serde_json::from_str(&row.commands).unwrap(),
}).collect(); }).collect();
Ok(rows) Ok(rows)