Interface INestedChannel
Represents a type of guild channel that can be nested within a category.
Assembly: Discord.Net.Core.dll​
View Source​
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​
ulong? CategoryId { get; }
Methods​
GetCategoryAsync(CacheMode, RequestOptions)​
Gets the parent (category) channel of this channel.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
SyncPermissionsAsync(RequestOptions)​
Syncs the permissions of this nested channel with its parent's.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | maxAge | The time (in seconds) until the invite expires. Set to null to never expire. |
System.Nullable<System.Int32> | maxUses | The max amount of times this invite may be used. Set to null to have unlimited uses. |
System.Boolean | isTemporary | If true , the user accepting this invite will be kicked from the guild after closing their client. |
System.Boolean | isUnique | If true , don't try to reuse a similar invite (useful for creating many unique one time use invites). |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | applicationId | The id of the embedded application to open for this invite. |
System.Nullable<System.Int32> | maxAge | The time (in seconds) until the invite expires. Set to null to never expire. |
System.Nullable<System.Int32> | maxUses | The max amount of times this invite may be used. Set to null to have unlimited uses. |
System.Boolean | isTemporary | If true , the user accepting this invite will be kicked from the guild after closing their client. |
System.Boolean | isUnique | If true , don't try to reuse a similar invite (useful for creating many unique one time use invites). |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.DefaultApplications | application | The application to open for this invite. |
System.Nullable<System.Int32> | maxAge | The time (in seconds) until the invite expires. Set to null to never expire. |
System.Nullable<System.Int32> | maxUses | The max amount of times this invite may be used. Set to null to have unlimited uses. |
System.Boolean | isTemporary | If true , the user accepting this invite will be kicked from the guild after closing their client. |
System.Boolean | isUnique | If true , don't try to reuse a similar invite (useful for creating many unique one time use invites). |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.IUser | user | The id of the user whose stream to display for this invite. |
System.Nullable<System.Int32> | maxAge | The time (in seconds) until the invite expires. Set to null to never expire. |
System.Nullable<System.Int32> | maxUses | The max amount of times this invite may be used. Set to null to have unlimited uses. |
System.Boolean | isTemporary | If true , the user accepting this invite will be kicked from the guild after closing their client. |
System.Boolean | isUnique | If true , don't try to reuse a similar invite (useful for creating many unique one time use invites). |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetInvitesAsync(RequestOptions)​
Gets a collection of all invites to this channel.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |