PresenceBuilder
PresenceBuilder is used to construct a presence object for a Discord bot, including activities, status, and AFK state.
Usage:
Properties
Status
PresenceBuilder.Status :: table
An enumeration of presence statuses.
- Online: “online”
- DoNotDisturb: “dnd”
- Idle: “idle”
- Invisible: “invisible”
- Offline: “offline”
Methods
addActivity
PresenceBuilder : addActivity () -> Builders.PresenceBuilder
activity: ActivityBuilder
Adds an activity to the presence.
setStatus
PresenceBuilder : setStatus () -> Builders.PresenceBuilder
status: string
Sets the status of the presence.
setAfk
PresenceBuilder : setAfk () -> Builders.PresenceBuilder
isAfk: boolean
Sets whether the presence is AFK.
setSince
PresenceBuilder : setSince () -> Builders.PresenceBuilder
delta: number
Sets the time since the presence was last updated.
toPayloadObject
PresenceBuilder : toPayloadObject () -> Network.Resolvable
Converts the presence to a JSON object that can be sent to the Discord API.
Functions
new
PresenceBuilder . new () -> ()
Creates a new instance of PresenceBuilder.