Method CreateChannelCategoryAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
CreateChannelCategoryAsync(string, IEnumerable<DiscordOverwriteBuilder>, string)
Creates a new channel category in this guild.
public Task<DiscordChannel> CreateChannelCategoryAsync(string name, IEnumerable<DiscordOverwriteBuilder> overwrites = null, string reason = null)
Parameters
name
stringName of the new category.
overwrites
IEnumerable<DiscordOverwriteBuilder>Permission overwrites for this category.
reason
stringReason for audit logs.
Returns
- Task<DiscordChannel>
The newly-created channel category.
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageChannels permission.
- NotFoundException
Thrown when the guild does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.