upload attachments
This commit is contained in:
@ -26,6 +26,45 @@ fn channel_default() -> u64 {
|
||||
0
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct EmbedField {
|
||||
title: String,
|
||||
value: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct JsonReminder {
|
||||
attachment: Option<String>,
|
||||
attachment_name: Option<String>,
|
||||
avatar: Option<String>,
|
||||
#[serde(with = "string")]
|
||||
channel: u64,
|
||||
content: String,
|
||||
embed_author: String,
|
||||
embed_author_url: Option<String>,
|
||||
embed_color: u32,
|
||||
embed_description: String,
|
||||
embed_footer: String,
|
||||
embed_footer_url: Option<String>,
|
||||
embed_image_url: Option<String>,
|
||||
embed_thumbnail_url: Option<String>,
|
||||
embed_title: String,
|
||||
embed_fields: Vec<EmbedField>,
|
||||
enabled: bool,
|
||||
expires: Option<NaiveDateTime>,
|
||||
interval_seconds: Option<u32>,
|
||||
interval_months: Option<u32>,
|
||||
#[serde(default = "name_default")]
|
||||
name: String,
|
||||
pin: bool,
|
||||
restartable: bool,
|
||||
tts: bool,
|
||||
#[serde(default)]
|
||||
uid: String,
|
||||
username: Option<String>,
|
||||
utc_time: NaiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct Reminder {
|
||||
attachment: Option<Vec<u8>>,
|
||||
@ -62,7 +101,7 @@ pub struct Reminder {
|
||||
pub struct PatchReminder {
|
||||
uid: String,
|
||||
#[serde(default)]
|
||||
attachment: Unset<Option<Vec<u8>>>,
|
||||
attachment: Unset<Option<String>>,
|
||||
#[serde(default)]
|
||||
attachment_name: Unset<Option<String>>,
|
||||
#[serde(default)]
|
||||
@ -91,6 +130,8 @@ pub struct PatchReminder {
|
||||
#[serde(default)]
|
||||
embed_title: Unset<String>,
|
||||
#[serde(default)]
|
||||
embed_fields: Unset<EmbedField>,
|
||||
#[serde(default)]
|
||||
enabled: Unset<bool>,
|
||||
#[serde(default)]
|
||||
expires: Unset<Option<NaiveDateTime>>,
|
||||
|
Reference in New Issue
Block a user