rust_commit_tracker/models/
discord.rs

1use serde::Serialize;
2
3#[derive(Debug, Serialize)]
4pub struct DiscordEmbed {
5    pub embeds: Vec<EmbedData>,
6}
7
8#[derive(Debug, Serialize)]
9pub struct EmbedData {
10    pub title: String,
11    pub description: String,
12    pub color: u32,
13    pub author: EmbedAuthor,
14    pub fields: Vec<EmbedField>,
15    pub footer: EmbedFooter,
16    pub timestamp: String,
17}
18
19#[derive(Debug, Serialize)]
20pub struct EmbedAuthor {
21    pub name: String,
22    pub url: String,
23    pub icon_url: String,
24}
25
26#[derive(Debug, Serialize)]
27pub struct EmbedField {
28    pub name: String,
29    pub value: String,
30    pub inline: bool,
31}
32
33#[derive(Debug, Serialize)]
34pub struct EmbedFooter {
35    pub text: String,
36    pub icon_url: String,
37}