Skip to content

Commit

Permalink
Allow for channels to be (or not be) set as nsfw.
Browse files Browse the repository at this point in the history
Fixes #551
  • Loading branch information
arqunis committed May 10, 2019
1 parent 23bed41 commit 1bd5bbc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/builder/edit_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ impl EditChannel {
self
}

/// Is the channel inappropriate for work?
///
/// This is for [text] channels only.
///
/// [text]: ../model/channel/enum.ChannelType.html#variant.Text
pub fn nsfw(&mut self, nsfw: bool) -> &mut Self {
self.0.insert("nsfw", Value::Bool(nsfw));

self
}

/// The number of users that may be in the channel simultaneously.
///
/// This is for [voice] channels only.
Expand Down

0 comments on commit 1bd5bbc

Please sign in to comment.