Class SocketCategoryChannel
Represents a WebSocket-based category channel.
Assembly: Discord.Net.WebSocket.dll​
View Source​
public class SocketCategoryChannel : SocketGuildChannel, ICategoryChannel, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties​
Users​
Gets a collection of users that are able to view the channel.
View Source​
public override IReadOnlyCollection<SocketGuildUser> Users { get; }
Channels​
Gets the child channels of this category.
View Source​
public IReadOnlyCollection<SocketGuildChannel> Channels { get; }
Methods​
GetUser(UInt64)​
View Source​
public override SocketGuildUser GetUser(ulong id)
Returns​
Discord.WebSocket.SocketGuildUser
Parameters​
Type | Name |
---|---|
System.UInt64 | id |
IGuildChannel.GetUsersAsync(CacheMode, RequestOptions)​
Gets a collection of users that are able to view the channel or are currently in this channel.
View Source​
IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
Returns​
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<Discord.IGuildUser>>
:
Paged collection of users.
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. |
IGuildChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)​
Gets a user in this channel.
View Source​
Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
Returns​
System.Threading.Tasks.Task<Discord.IGuildUser>
:
A task representing the asynchronous get operation. The task result contains a guild user object that
represents the user; null
if none is found.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier of the user. |
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. |
IChannel.GetUsersAsync(CacheMode, RequestOptions)​
Gets a collection of users that are able to view the channel or are currently in this channel.
View Source​
IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
Returns​
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<Discord.IUser>>
:
Paged collection of users.
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. |
IChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)​
Gets a user in this channel.
View Source​
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
Returns​
System.Threading.Tasks.Task<Discord.IUser>
:
A task that represents the asynchronous get operation. The task result contains a user object that
represents the found user; null
if none is found.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier of the user (e.g. 168693960628371456 ). |
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. |