API reference
Method CreateApplicationChannelAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
CreateApplicationChannelAsync(string, ulong, DiscordChannel?, Optional<string>, IEnumerable<DiscordOverwriteBuilder>?, bool?, Optional<int?>, ThreadAutoArchiveDuration, Optional<ChannelFlags?>, string?, CancellationToken)
Creates an application-powered channel. This capability is undocumented by Discord and may require guild-specific access.
public Task<DiscordChannel> CreateApplicationChannelAsync(string name, ulong applicationId, DiscordChannel? parent = null, Optional<string> topic = default, IEnumerable<DiscordOverwriteBuilder>? overwrites = null, bool? nsfw = null, Optional<int?> perUserRateLimit = default, ThreadAutoArchiveDuration defaultAutoArchiveDuration = ThreadAutoArchiveDuration.OneDay, Optional<ChannelFlags?> flags = default, string? reason = null, CancellationToken cancellationToken = default)
Parameters
namestringName of the new channel.
applicationIdulongID of the application powering the channel.
parentDiscordChannelCategory to put the channel in.
topicOptional<string>Topic of the channel.
overwritesIEnumerable<DiscordOverwriteBuilder>Permission overwrites for the channel.
nsfwbool?Whether the channel is age restricted.
perUserRateLimitOptional<int?>Slow mode timeout for users.
defaultAutoArchiveDurationThreadAutoArchiveDurationDefault auto archive duration for new threads.
flagsOptional<ChannelFlags?>Flags of the new channel.
reasonstringReason for the audit log.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<DiscordChannel>
The newly created channel.