Skip to main content

Class RestChannel

Represents a generic REST-based channel.

Assembly: Discord.Net.Rest.dll​
View Source​
Declaration
public class RestChannel : RestEntity<ulong>, IChannel, ISnowflakeEntity, IEntity<ulong>, IUpdateable

Properties​

CreatedAt​

Gets when the snowflake was created.

View Source​
Declaration
public DateTimeOffset CreatedAt { get; }

IChannel.Name​

Gets the name of this channel.

View Source​
Declaration
string IChannel.Name { get; }

Methods​

UpdateAsync(RequestOptions)​

Updates this object's properties with its current state.

View Source​
Declaration
public virtual Task UpdateAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task

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

IChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)​

Gets a user in this channel.

View Source​
Declaration
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​
TypeNameDescription
System.UInt64idThe snowflake identifier of the user (e.g. 168693960628371456).
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe 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​
Declaration
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​
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.

Implements​