Skip to main content

Namespace: Presence

Interfaces

Type Aliases

Config

Ƭ Config<T>: Object

Type parameters

NameType
Textends keyof Dependencies[]

Type declaration

NameType
execute(...v: IntoDependencies<T>) => Result
inject?[...T]

Defined in

src/core/presences.ts:17

Functions

module

module<T>(conf): Config<T>

A small wrapper to provide type inference. Create a Presence module which MUST be put in a file called presence.(language-extension) adjacent to the file where Sern.init is CALLED.

Type parameters

NameType
Textends keyof Dependencies[]

Parameters

NameType
confConfig<T>

Returns

Config<T>

Defined in

src/core/presences.ts:28


of

of(root): Object

Create a Presence body which can be either:

  • once, the presence is activated only once.
  • repeated, per cycle or event, the presence can be changed.

Parameters

NameType
rootOmit<Result, "repeat" | "onRepeat">

Returns

Object

NameType
once() => Omit<Result, "repeat" | "onRepeat">
repeated(onRepeat: PresenceReduce, repeat: number | [Emitter, string]) => { activities?: ActivitiesOptions[] ; afk?: boolean ; onRepeat: PresenceReduce ; repeat: number | [Emitter, string] ; shardId?: number[] ; status?: Status }

Defined in

src/core/presences.ts:37