public static async Task <Model> ModifyAsync(ITextChannel channel, BaseDiscordClient client, Action <ModifyTextChannelParams> func, RequestOptions options) { var args = new ModifyTextChannelParams(); func(args); return(await client.ApiClient.ModifyGuildChannelAsync(channel.Id, args, options).ConfigureAwait(false)); }
public async Task ModifyAsync(Action <ModifyTextChannelParams> func) { if (func == null) { throw new NullReferenceException(nameof(func)); } var args = new ModifyTextChannelParams(); func(args); if (!args._name.IsSpecified) { args._name = Name; } var model = await Discord.ApiClient.ModifyGuildChannelAsync(Id, args).ConfigureAwait(false); Update(model, UpdateSource.Rest); }