ActivityBuilder
ActivityBuilder is used to construct an activity object for a Discord bot - including name, type, and streaming URL.
Usage:
Properties
Type
ActivityBuilder.Type :: table
An enumeration of activity types.
- Game: 0
- Streaming: 1
- Listening: 2
- Watching: 3
- Competing: 5
Methods
setActivityName
ActivityBuilder : setActivityName () -> Builders.ActivityBuilder
activityName: string
Sets the name of the activity.
setActivityType
ActivityBuilder : setActivityType () -> Builders.ActivityBuilder
activityType: number
Sets the type of the activity.
setStreamingURL
ActivityBuilder : setStreamingURL () -> Builders.ActivityBuilder
streamURL: string
Sets the streaming URL of the activity. Only YouTube and Twitch URLs are allowed.
toPayloadObject
ActivityBuilder : toPayloadObject () -> Network.Resolvable
Converts the activity to a JSON object that can be sent to the Discord API.
Functions
new
ActivityBuilder . new () -> ()
Creates a new instance of ActivityBuilder.