public Task <RestTextChannel> CreateTextChannelAsync(string name, RequestOptions options = null) => GuildHelper.CreateTextChannelAsync(this, Discord, name, options);
/// <summary> /// Creates a new text channel in this guild. /// </summary> /// <example> /// The following example creates a new text channel under an existing category named <c>Wumpus</c> with a set topic. /// <code lang="cs"> /// var categories = await guild.GetCategoriesAsync(); /// var targetCategory = categories.FirstOrDefault(x => x.Name == "wumpus"); /// if (targetCategory == null) return; /// await Context.Guild.CreateTextChannelAsync(name, x => /// { /// x.CategoryId = targetCategory.Id; /// x.Topic = $"This channel was created at {DateTimeOffset.UtcNow} by {user}."; /// }); /// </code> /// </example> /// <param name="name">The new name for the text channel.</param> /// <param name="func">The delegate containing the properties to be applied to the channel upon its creation.</param> /// <param name="options">The options to be used when sending the request.</param> /// <returns> /// A task that represents the asynchronous creation operation. The task result contains the newly created /// text channel. /// </returns> public Task <RestTextChannel> CreateTextChannelAsync(string name, Action <TextChannelProperties> func = null, RequestOptions options = null) => GuildHelper.CreateTextChannelAsync(this, Discord, name, options, func);