Update January definitions; add servers collection
This commit is contained in:
@@ -18,12 +18,21 @@ pub struct Media {
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Metadata {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
url: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
title: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
description: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
image: Option<Media>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
site_name: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
icon_url: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
color: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
mod guild;
|
||||
mod server;
|
||||
mod autumn;
|
||||
mod january;
|
||||
mod channel;
|
||||
@@ -8,6 +8,6 @@ mod user;
|
||||
pub use january::*;
|
||||
pub use autumn::*;
|
||||
pub use channel::*;
|
||||
pub use guild::*;
|
||||
pub use server::*;
|
||||
pub use message::*;
|
||||
pub use user::*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// use serde::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/*#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct MemberCompositeKey {
|
||||
pub guild: String,
|
||||
pub user: String,
|
||||
@@ -27,12 +27,11 @@ pub struct Ban {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Guild {
|
||||
pub struct Server {
|
||||
#[serde(rename = "_id")]
|
||||
pub id: String,
|
||||
// pub nonce: String, used internally
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub nonce: Option<String>,
|
||||
pub owner: String,
|
||||
|
||||
pub channels: Vec<String>,
|
||||
@@ -40,4 +39,4 @@ pub struct Guild {
|
||||
pub bans: Vec<Ban>,
|
||||
|
||||
pub default_permissions: u32,
|
||||
}*/
|
||||
}
|
||||
Reference in New Issue
Block a user