Store guild when creating reminders

This commit is contained in:
jude
2023-08-19 21:21:56 +01:00
parent 6726ca0c2d
commit 109cf16dbb
7 changed files with 108 additions and 76 deletions

View File

@ -152,6 +152,18 @@ pub struct Reminder {
utc_time: NaiveDateTime,
}
#[derive(Serialize)]
pub struct ReminderError {
#[serde(with = "string")]
channel: u64,
status: String,
#[serde(default = "name_default")]
name: String,
#[serde(default)]
uid: String,
utc_time: NaiveDateTime,
}
#[derive(Serialize, Deserialize)]
pub struct ReminderCsv {
#[serde(with = "base64s")]
@ -479,6 +491,7 @@ pub async fn create_reminder(
attachment,
attachment_name,
channel_id,
guild_id,
avatar,
content,
embed_author,
@ -501,11 +514,12 @@ pub async fn create_reminder(
tts,
username,
`utc_time`
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
new_uid,
attachment_data,
reminder.attachment_name,
channel,
guild_id.0,
reminder.avatar,
reminder.content,
reminder.embed_author,