rust-discord-activity 0.1.0

A lightweight library to control Discord Rich Presence
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::Serialize;

#[derive(Serialize, Debug)]
pub struct Emoji {
    name: String,

    #[serde(skip_serializing_if = "Option::is_none")]
    id: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    animated: Option<bool>,
}

impl Emoji {
    pub fn new(name: String, id: Option<i64>, animated: Option<bool>) -> Emoji {
        Self { name, id, animated }
    }
}