Show / Hide Table of Contents

Class RestCategoryChannel

Represents a REST-based category channel.

Inheritance
System.Object
RestEntity<System.UInt64>
RestChannel
RestGuildChannel
RestCategoryChannel
Implements
IUpdateable
ICategoryChannel
IGuildChannel
IChannel
ISnowflakeEntity
IEntity<System.UInt64>
IDeletable
Inherited Members
RestGuildChannel.PermissionOverwrites
RestGuildChannel.Name
RestGuildChannel.Position
RestGuildChannel.GuildId
RestGuildChannel.UpdateAsync(RequestOptions)
RestGuildChannel.ModifyAsync(Action<GuildChannelProperties>, RequestOptions)
RestGuildChannel.DeleteAsync(RequestOptions)
RestGuildChannel.GetPermissionOverwrite(IUser)
RestGuildChannel.GetPermissionOverwrite(IRole)
RestGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)
RestGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)
RestGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)
RestGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)
RestGuildChannel.ToString()
RestGuildChannel.IGuildChannel.Guild
RestGuildChannel.IGuildChannel.GetPermissionOverwrite(IRole)
RestGuildChannel.IGuildChannel.GetPermissionOverwrite(IUser)
RestGuildChannel.IGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)
RestGuildChannel.IGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)
RestGuildChannel.IGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)
RestGuildChannel.IGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)
RestGuildChannel.IGuildChannel.GetUsersAsync(CacheMode, RequestOptions)
RestGuildChannel.IGuildChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)
RestChannel.CreatedAt
RestChannel.IChannel.Name
RestEntity<UInt64>.Id
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord.Rest
Assembly: Discord.Net.Rest.dll
Syntax
public class RestCategoryChannel : RestGuildChannel, IUpdateable, ICategoryChannel, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable

Explicit Interface Implementations

| Improve this Doc View Source

IChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)

Gets a user in this channel.

Declaration
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
Parameters
Type Name Description
System.UInt64 id

The snowflake identifier of the user (e.g. 168693960628371456).

CacheMode mode

The CacheMode that determines whether the object should be fetched from cache.

RequestOptions options

The options to be used when sending the request.

Returns
Type Description
System.Threading.Tasks.Task<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.

Exceptions
Type Condition
System.NotSupportedException

This method is not supported with category channels.

| Improve this Doc View Source

IChannel.GetUsersAsync(CacheMode, RequestOptions)

Gets a collection of users that are able to view the channel or are currently in this channel.

Declaration
IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
Parameters
Type Name Description
CacheMode mode

The CacheMode that determines whether the object should be fetched from cache.

RequestOptions options

The options to be used when sending the request.

Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<IUser>>

Paged collection of users.

Remarks
important

The returned collection is an asynchronous enumerable object; one must call FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>) to access the individual messages as a collection.

This method will attempt to fetch all users that is able to view this channel or is currently in this channel. The library will attempt to split up the requests according to and MaxUsersPerBatch. In other words, if there are 3000 users, and the MaxUsersPerBatch constant is 1000, the request will be split into 3 individual requests; thus returning 53individual asynchronous responses, hence the need of flattening.
Exceptions
Type Condition
System.NotSupportedException

This method is not supported with category channels.

Implements

IUpdateable
ICategoryChannel
IGuildChannel
IChannel
ISnowflakeEntity
IEntity<TId>
IDeletable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX