Skip to content

Interface: GetActiveUsersOptions ​

Options for k.chat.getActiveUsers(), used to filter and sort active viewers.

Properties ​

count? ​

ts
optional count?: number;

Maximum number of viewers returned.

Default Value ​

100


excludes? ​

ts
optional excludes?: 
  | User[]
  | {
  display_name?: string;
  id?: number;
  login?: string;
}[];

Viewers to exclude from the selection. An array of User or of partial objects { id?, login?, display_name? }. The comparison is done on property.

Default Value ​

[]


property? ​

ts
optional property?: "id" | "login" | "display_name";

Field used to compare the exclusions.

Default Value ​

'login'


randomize? ​

ts
optional randomize?: boolean;

If true, shuffles the list before trimming it to count (random selection). Otherwise, sorts from most recent to oldest.

Default Value ​

false


time? ​

ts
optional time?: number;

Activity window in seconds: a viewer is considered "active" if they have spoken within the last time seconds.

Default Value ​

The duration configured by the platform (Options.ACTIVE_USER_DURATION).