Method CreateVoiceChannelAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
CreateVoiceChannelAsync(string, DiscordChannel?, int?, int?, IEnumerable<DiscordOverwriteBuilder>?, VideoQualityMode?, Optional<ChannelFlags?>, string?)
Creates a new voice channel in this guild.
public Task<DiscordChannel> CreateVoiceChannelAsync(string name, DiscordChannel? parent = null, int? bitrate = null, int? userLimit = null, IEnumerable<DiscordOverwriteBuilder>? overwrites = null, VideoQualityMode? qualityMode = null, Optional<ChannelFlags?> flags = default, string? reason = null)
Parameters
name
stringName of the new channel.
parent
DiscordChannelCategory to put this channel in.
bitrate
int?Bitrate of the channel.
userLimit
int?Maximum number of users in the channel.
overwrites
IEnumerable<DiscordOverwriteBuilder>Permission overwrites for this channel.
qualityMode
VideoQualityMode?Video quality mode of the channel.
flags
Optional<ChannelFlags?>The flags of the new channel.
reason
stringReason for audit logs.
Returns
- Task<DiscordChannel>
The newly-created channel.
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.