Class SocketChannel
Represents a WebSocket-based channel.
Inherited Members
System.Object.ToString()
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.WebSocket
Assembly: Discord.Net.WebSocket.dll
Syntax
public abstract class SocketChannel : SocketEntity<ulong>, IChannel, ISnowflakeEntity, IEntity<ulong>
Properties
| Improve this Doc View SourceCreatedAt
Gets when the channel is created.
Declaration
public DateTimeOffset CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| System.DateTimeOffset |
Users
Gets a collection of users from the WebSocket cache.
Declaration
public IReadOnlyCollection<SocketUser> Users { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<SocketUser> |
Methods
| Improve this Doc View SourceGetUser(UInt64)
Gets a generic user from this channel.
Declaration
public SocketUser GetUser(ulong id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt64 | id | The snowflake identifier of the user. |
Returns
| Type | Description |
|---|---|
| SocketUser | A generic WebSocket-based user associated with the snowflake identifier. |
Explicit Interface Implementations
| Improve this Doc View SourceIChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)
Declaration
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt64 | id | |
| CacheMode | mode | |
| RequestOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<IUser> |
IChannel.Name
Declaration
string IChannel.Name { get; }
Returns
| Type | Description |
|---|---|
| System.String |