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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
use serde::{Deserialize, Serialize};
use walle_macro::{_PushToValueMap as PushToValueMap, _TryFromValue as TryFromValue};
#[derive(
Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue, Hash, Serialize, Deserialize, Default,
)]
pub struct Selft {
pub platform: String,
pub user_id: String,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct Bot {
pub selft: Selft,
pub online: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct Status {
pub good: bool,
pub bots: Vec<Bot>,
}
#[derive(Debug, Clone, PartialEq, PushToValueMap, TryFromValue)]
pub struct SendMessageResp {
pub message_id: String,
pub time: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct UserInfo {
pub user_id: String,
pub user_name: String,
pub user_displayname: String,
pub user_remark: String,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct GroupInfo {
pub group_id: String,
pub group_name: String,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct FileId {
pub file_id: String,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct File {
pub name: String,
pub url: Option<String>,
pub headers: Option<std::collections::HashMap<String, String>>,
pub path: Option<String>,
pub data: Option<Vec<u8>>,
pub sha256: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct GuildInfo {
pub guild_id: String,
pub guild_name: String,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct ChannelInfo {
pub channel_id: String,
pub channel_name: String,
}
#[derive(Debug, Clone, PartialEq, Eq, PushToValueMap, TryFromValue)]
pub struct Version {
pub implt: String,
pub version: String,
pub onebot_version: String,
}