add nsfw to servers and channels

This commit is contained in:
Zomatree
2021-08-16 00:18:14 +01:00
parent 28c4312880
commit d4f7c4a77d
7 changed files with 54 additions and 7 deletions

View File

@@ -107,6 +107,9 @@ pub struct Server {
pub icon: Option<File>,
#[serde(skip_serializing_if = "Option::is_none")]
pub banner: Option<File>,
#[serde(skip_serializing_if = "is_false", default)]
pub nsfw: bool
}
impl Server {
@@ -436,3 +439,7 @@ impl Server {
})?)
}
}
fn is_false(value: &bool) -> bool {
!value
}