1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
10pub struct Reaction {
11 pub emoji: String,
13 pub count: u32,
15 #[serde(default)]
17 pub user_ids: Vec<String>,
18}
19
20#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct Message {
23 pub id: String,
24 pub sender: String,
25 pub content: String,
26 pub timestamp: i64,
27 #[serde(default)]
28 pub channel: Option<String>,
29 #[serde(default)]
31 pub reply_to: Option<String>,
32 #[serde(default)]
33 pub media: Option<Vec<MediaAttachment>>,
34 #[serde(default)]
35 pub is_direct: bool,
36 #[serde(default)]
39 pub reactions: Option<Vec<Reaction>>,
40}
41
42#[derive(Debug, Clone, Serialize, Deserialize)]
44pub struct MediaAttachment {
45 pub url: Option<String>,
46 pub path: Option<String>,
47 pub mime_type: Option<String>,
48 pub filename: Option<String>,
49}
50
51#[derive(Debug, Default)]
53pub struct SendOptions<'a> {
54 pub recipient: &'a str,
55 pub content: &'a str,
56 pub reply_to: Option<&'a str>,
57 pub silent: bool,
58 pub media: Option<&'a str>,
59}