forked from jmug/stoatchat
Add guild bans / unbans.
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
use bson::doc;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct MemberRef {
|
||||
pub guild: String,
|
||||
pub user: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Member {
|
||||
pub id: String,
|
||||
pub nickname: String,
|
||||
#[serde(rename = "_id")]
|
||||
pub id: MemberRef,
|
||||
pub nickname: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
@@ -14,6 +21,12 @@ pub struct Invite {
|
||||
pub channel: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Ban {
|
||||
pub id: String,
|
||||
pub reason: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Guild {
|
||||
#[serde(rename = "_id")]
|
||||
@@ -25,6 +38,7 @@ pub struct Guild {
|
||||
|
||||
pub channels: Vec<String>,
|
||||
pub invites: Vec<Invite>,
|
||||
pub bans: Vec<Ban>,
|
||||
|
||||
pub default_permissions: u32,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user