aboutsummaryrefslogtreecommitdiff
path: root/src/model/guild/partial_guild.rs
diff options
context:
space:
mode:
authorKyle Clemens <[email protected]>2018-01-08 13:18:13 -0500
committeralex <[email protected]>2018-01-08 19:18:13 +0100
commit6587655bf90d662191538b11884311e5aff4b120 (patch)
treec27db8c664503cc9d18c49ce601ed66c06ce2fd7 /src/model/guild/partial_guild.rs
parentSet a travis caching timeout of 900 seconds (diff)
downloadserenity-6587655bf90d662191538b11884311e5aff4b120.tar.xz
serenity-6587655bf90d662191538b11884311e5aff4b120.zip
Allow channels to be moved in and out of a category (#248)
Diffstat (limited to 'src/model/guild/partial_guild.rs')
-rw-r--r--src/model/guild/partial_guild.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/model/guild/partial_guild.rs b/src/model/guild/partial_guild.rs
index e67ca03..aebd6e7 100644
--- a/src/model/guild/partial_guild.rs
+++ b/src/model/guild/partial_guild.rs
@@ -96,15 +96,16 @@ impl PartialGuild {
/// ```rust,ignore
/// use serenity::model::ChannelType;
///
- /// guild.create_channel("test", ChannelType::Voice);
+ /// guild.create_channel("test", ChannelType::Voice, None);
/// ```
///
/// [`GuildChannel`]: struct.GuildChannel.html
/// [`http::create_channel`]: ../http/fn.create_channel.html
/// [Manage Channels]: permissions/constant.MANAGE_CHANNELS.html
#[inline]
- pub fn create_channel(&self, name: &str, kind: ChannelType) -> Result<GuildChannel> {
- self.id.create_channel(name, kind)
+ pub fn create_channel<C>(&self, name: &str, kind: ChannelType, category: C) -> Result<GuildChannel>
+ where C: Into<Option<ChannelId>> {
+ self.id.create_channel(name, kind, category)
}
/// Creates an emoji in the guild with a name and base64-encoded image.