Activity
Implementation of Discord Activity as a Luau builder.
https://discord.com/developers/docs/events/gateway-events#activity-object
Note: Only YouTube and Twitch URLs are allowed for streaming.
Properties
The Activity instance has no set properties!
Methods
The Activity instance has no set methods!
Functions
setActivityName
Activity . setActivityName () -> ()
self: Activity
name: string
Sets the name of the activity.
setActivityType
Activity . setActivityType () -> ()
self: Activity
activityType: apiTypes.ActivityType
Sets the type of the activity.
setStreamingURL
Activity . setStreamingURL () -> ()
self: Activity
streamURL: string
Sets the streaming URL of the activity. Only YouTube and Twitch URLs are allowed.
build
Activity . build () -> ()
self: Activity
Builds the activity JSON payload that can be parsed by the Discord API.
new
Activity . new ( ) -> ()
Creates a new Activity.
local activity = Activity.new({ name = "Playing a game", activityType = "Game", streamingURL = "https://twitch.tv/example"})