Skip to main content

Interface IChannel

Represents a generic channel.

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

Properties​

Name​

Gets the name of this channel.

View Source​
Declaration
string Name { get; }

Methods​

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>> GetUsersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
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.

GetUserAsync(UInt64, CacheMode, RequestOptions)​

Gets a user in this channel.

View Source​
Declaration
Task<IUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
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.