Activity
Defined in: sdk/js/src/presence.ts:24
What the bot is doing. Build one with Activity.playing(…), Activity.listening(…), …
Properties
Section titled “Properties”
readonlydata:Activity
Defined in: sdk/js/src/presence.ts:25
Methods
Section titled “Methods”setDetails()
Section titled “setDetails()”setDetails(
details):Activity
Defined in: sdk/js/src/presence.ts:62
A second line, e.g. the track (≤ 128 characters).
Parameters
Section titled “Parameters”details
Section titled “details”string
Returns
Section titled “Returns”Activity
setEmoji()
Section titled “setEmoji()”setEmoji(
emoji):Activity
Defined in: sdk/js/src/presence.ts:77
A Unicode emoji, for Activity.custom only.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Activity
setStartedAt()
Section titled “setStartedAt()”setStartedAt(
ms):Activity
Defined in: sdk/js/src/presence.ts:72
When it started, ms since the epoch (clients show the elapsed time).
Parameters
Section titled “Parameters”number | bigint
Returns
Section titled “Returns”Activity
setState()
Section titled “setState()”setState(
state):Activity
Defined in: sdk/js/src/presence.ts:67
A third line, e.g. the artist (≤ 128 characters).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Activity
competing()
Section titled “competing()”
staticcompeting(name):Activity
Defined in: sdk/js/src/presence.ts:52
“Competing in {name}”.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Activity
custom()
Section titled “custom()”
staticcustom(text):Activity
Defined in: sdk/js/src/presence.ts:57
Free text, with an optional emoji (setEmoji).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Activity
listening()
Section titled “listening()”
staticlistening(name):Activity
Defined in: sdk/js/src/presence.ts:42
“Listening to {name}”.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Activity
playing()
Section titled “playing()”
staticplaying(name):Activity
Defined in: sdk/js/src/presence.ts:32
“Playing {name}”.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Activity
streaming()
Section titled “streaming()”
staticstreaming(name,url):Activity
Defined in: sdk/js/src/presence.ts:37
“Streaming {name}”, with an https:// link members may open (after confirming).
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Activity
watching()
Section titled “watching()”
staticwatching(name):Activity
Defined in: sdk/js/src/presence.ts:47
“Watching {name}”.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Activity