From b27ad0e37d1621608abb069fda6bf000e99b4862 Mon Sep 17 00:00:00 2001 From: Jedimaster4559 Date: Sat, 24 Nov 2018 01:03:31 -0600 Subject: [PATCH] fixed unimplemented methods (for CreateCategoryChannelAsync) and added appropriate documentation --- src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs | 9 +++++---- src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs index bd70bf96b..a847998b5 100644 --- a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs +++ b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs @@ -441,13 +441,14 @@ namespace Discord.Rest /// Creates a category channel with the provided name. /// /// The name of the new channel. + /// The delegate containing the properties to be applied to the channel upon its creation. /// The options to be used when sending the request. /// is null. /// /// The created category channel. /// - public Task CreateCategoryChannelAsync(string name, RequestOptions options = null) - => GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options); + public Task CreateCategoryChannelAsync(string name, Action func = null, RequestOptions options = null) + => GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options, func); /// /// Gets a collection of all the voice regions this guild can access. @@ -776,8 +777,8 @@ namespace Discord.Rest async Task IGuild.CreateVoiceChannelAsync(string name, Action func, RequestOptions options) => await CreateVoiceChannelAsync(name, func, options).ConfigureAwait(false); /// - async Task IGuild.CreateCategoryAsync(string name, RequestOptions options) - => await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); + async Task IGuild.CreateCategoryAsync(string name, Action func, RequestOptions options) + => await CreateCategoryChannelAsync(name, func, options).ConfigureAwait(false); /// async Task> IGuild.GetVoiceRegionsAsync(RequestOptions options) diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs index 412f3acff..4e4124679 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs @@ -561,14 +561,15 @@ namespace Discord.WebSocket /// Creates a new channel category in this guild. /// /// The new name for the category. + /// The delegate containing the properties to be applied to the channel upon its creation. /// The options to be used when sending the request. /// is null. /// /// A task that represents the asynchronous creation operation. The task result contains the newly created /// category channel. /// - public Task CreateCategoryChannelAsync(string name, RequestOptions options = null) - => GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options); + public Task CreateCategoryChannelAsync(string name, Action func = null, RequestOptions options = null) + => GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options, func); internal SocketGuildChannel AddChannel(ClientState state, ChannelModel model) { @@ -1069,8 +1070,8 @@ namespace Discord.WebSocket async Task IGuild.CreateVoiceChannelAsync(string name, Action func, RequestOptions options) => await CreateVoiceChannelAsync(name, func, options).ConfigureAwait(false); /// - async Task IGuild.CreateCategoryAsync(string name, RequestOptions options) - => await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); + async Task IGuild.CreateCategoryAsync(string name, Action func, RequestOptions options) + => await CreateCategoryChannelAsync(name, func, options).ConfigureAwait(false); /// async Task> IGuild.GetVoiceRegionsAsync(RequestOptions options)