add nsfw to servers and channels
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user