Table of Contents

Class SocketChannel

Namespace
Kook.WebSocket
Assembly
Kook.Net.WebSocket.dll

Represents a WebSocket-based channel.

public abstract class SocketChannel : SocketEntity<ulong>, IChannel, IEntity<ulong>, IUpdateable
Inheritance
SocketChannel
Implements
Derived
Inherited Members
Extension Methods

Properties

Users

Gets a collection of users from the WebSocket cache.

public IReadOnlyCollection<SocketUser> Users { get; }

Property Value

IReadOnlyCollection<SocketUser>

Methods

GetUser(ulong)

Gets a generic user from this channel.

public SocketUser? GetUser(ulong id)

Parameters

id ulong

The identifier of the user.

Returns

SocketUser

A generic WebSocket-based user associated with the identifier.

UpdateAsync(RequestOptions?)

Updates this object's properties with its current state.

public abstract Task UpdateAsync(RequestOptions? options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents an asynchronous reloading operation.

Remarks

warning

This method will fetch the latest data from REST API, and replace the current object's properties with the new data.