Presence
const
Presence:object
Type declaration
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
• T extends keyof Dependencies
[]
Parameters
• conf: Config
<T
>
Returns
Config
<T
>
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
• root: Omit
<Result
, "repeat"
| "onRepeat"
>
Returns
object
once()
once: () =>
Omit
<Result
,"repeat"
|"onRepeat"
>
Example
Returns
Omit
<Result
, "repeat"
| "onRepeat"
>
repeated()
repeated: (
onRepeat
,repeat
) =>object
Example
Parameters
• onRepeat: PresenceReduce
• repeat: number
| [Emitter
, string
]
Returns
object
activities?
optional
activities:ActivitiesOptions
[]
afk?
optional
afk:boolean
onRepeat
onRepeat:
PresenceReduce
repeat
repeat:
number
| [Emitter
,string
]
shardId?
optional
shardId:number
[]
status?
optional
status:Status