Skip to main content

Interface INestedChannel

Represents a type of guild channel that can be nested within a category.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public interface INestedChannel : IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable

Properties​

CategoryId​

Gets the parent (category) ID of this channel in the guild's channel list.

View Source​
Declaration
ulong? CategoryId { get; }

Methods​

GetCategoryAsync(CacheMode, RequestOptions)​

Gets the parent (category) channel of this channel.

View Source​
Declaration
Task<ICategoryChannel> GetCategoryAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ICategoryChannel>: A task that represents the asynchronous get operation. The task result contains the category channel representing the parent of this channel; null if none is set.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

SyncPermissionsAsync(RequestOptions)​

Syncs the permissions of this nested channel with its parent's.

View Source​
Declaration
Task SyncPermissionsAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous operation for syncing channel permissions with its parent's.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateInviteAsync(Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)​

Creates a new invite to this channel.

View Source​
Declaration
Task<IInviteMetadata> CreateInviteAsync(int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IInviteMetadata>: A task that represents the asynchronous invite creation operation. The task result contains an invite metadata object containing information for the created invite.

Parameters​
TypeNameDescription
System.Nullable<System.Int32>maxAgeThe time (in seconds) until the invite expires. Set to null to never expire.
System.Nullable<System.Int32>maxUsesThe max amount of times this invite may be used. Set to null to have unlimited uses.
System.BooleanisTemporaryIf true, the user accepting this invite will be kicked from the guild after closing their client.
System.BooleanisUniqueIf true, don't try to reuse a similar invite (useful for creating many unique one time use invites).
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateInviteToApplicationAsync(UInt64, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)​

Creates a new invite to this channel.

View Source​
Declaration
Task<IInviteMetadata> CreateInviteToApplicationAsync(ulong applicationId, int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IInviteMetadata>: A task that represents the asynchronous invite creation operation. The task result contains an invite metadata object containing information for the created invite.

Parameters​
TypeNameDescription
System.UInt64applicationIdThe id of the embedded application to open for this invite.
System.Nullable<System.Int32>maxAgeThe time (in seconds) until the invite expires. Set to null to never expire.
System.Nullable<System.Int32>maxUsesThe max amount of times this invite may be used. Set to null to have unlimited uses.
System.BooleanisTemporaryIf true, the user accepting this invite will be kicked from the guild after closing their client.
System.BooleanisUniqueIf true, don't try to reuse a similar invite (useful for creating many unique one time use invites).
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateInviteToApplicationAsync(DefaultApplications, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)​

Creates a new invite to this channel.

View Source​
Declaration
Task<IInviteMetadata> CreateInviteToApplicationAsync(DefaultApplications application, int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IInviteMetadata>: A task that represents the asynchronous invite creation operation. The task result contains an invite metadata object containing information for the created invite.

Parameters​
TypeNameDescription
Discord.DefaultApplicationsapplicationThe application to open for this invite.
System.Nullable<System.Int32>maxAgeThe time (in seconds) until the invite expires. Set to null to never expire.
System.Nullable<System.Int32>maxUsesThe max amount of times this invite may be used. Set to null to have unlimited uses.
System.BooleanisTemporaryIf true, the user accepting this invite will be kicked from the guild after closing their client.
System.BooleanisUniqueIf true, don't try to reuse a similar invite (useful for creating many unique one time use invites).
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateInviteToStreamAsync(IUser, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)​

Creates a new invite to this channel.

View Source​
Declaration
Task<IInviteMetadata> CreateInviteToStreamAsync(IUser user, int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IInviteMetadata>: A task that represents the asynchronous invite creation operation. The task result contains an invite metadata object containing information for the created invite.

Parameters​
TypeNameDescription
Discord.IUseruserThe id of the user whose stream to display for this invite.
System.Nullable<System.Int32>maxAgeThe time (in seconds) until the invite expires. Set to null to never expire.
System.Nullable<System.Int32>maxUsesThe max amount of times this invite may be used. Set to null to have unlimited uses.
System.BooleanisTemporaryIf true, the user accepting this invite will be kicked from the guild after closing their client.
System.BooleanisUniqueIf true, don't try to reuse a similar invite (useful for creating many unique one time use invites).
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetInvitesAsync(RequestOptions)​

Gets a collection of all invites to this channel.

View Source​
Declaration
Task<IReadOnlyCollection<IInviteMetadata>> GetInvitesAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IInviteMetadata>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of invite metadata that are created for this channel.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.