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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize)] pub struct BanList { pub ban_count: u64, pub page_count: u64, pub per_page: u64, pub page: u64, pub on_page: u64, pub next_page: u64, pub previous_page: Option<u64>, pub data: Vec<BanData> } #[derive(Clone, Debug, Deserialize)] pub struct BanData { pub id: String, pub name: String, pub discriminator: String, pub moderator_id: String, pub reason: String, pub proof: String, pub is_ban_active: bool, pub can_be_appealed: bool, pub timestamp: String, pub appeal_reason: Option<String>, pub appeal_date: Option<String> } #[derive(Clone, Debug, Serialize)] pub struct BanAddition { #[serde(rename = "user")] pub user_id: u64, pub reason: String, pub proof: String, #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "mod")] pub moderator: Option<u64>, #[serde(skip_serializing_if = "Option::is_none")] pub user_name: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub user_discriminator: Option<u16>, #[serde(skip_serializing_if = "Option::is_none")] pub appeal_possible: Option<bool> } #[derive(Clone, Debug, Deserialize)] pub struct BanAdditionResponse { pub success: bool } #[derive(Clone, Debug, Deserialize)] pub struct BanDeletionResponse { pub done: bool } #[derive(Clone, Debug, Deserialize)] pub struct BanCheckResponse { pub is_banned: bool } #[derive(Clone, Debug, Deserialize)] pub struct BanInfoResponse { pub id: String, pub name: String, pub discriminator: String, pub moderator_id: String, pub reason: String, pub proof: String, pub is_ban_active: bool, pub can_be_appealed: bool, pub timestamp: String, pub appeal_reason: Option<String>, pub appeal_date: Option<String>, pub requested_by: String, pub exists: bool, } #[derive(Clone, Debug, Deserialize)] pub struct RawBanUpdate { pub data: Vec<BanUpdate>, #[serde(rename = "current_timestamp")] pub timestamp: u64 } #[derive(Clone, Debug, Deserialize)] pub struct BanUpdate { pub id: u64, pub reason: String, pub proof: String, #[serde(rename = "moderator_id")] pub moderator: u64, pub active: bool }