UpdateDiscordActivity
From Onset Developer Wiki
Description
Sets the discord activity. Requires "discord_client_id" to be set in the server config.
https://discord.com/developers/docs/game-sdk/activities
Syntax
UpdateDiscordActivity(activity)
Parameters
- activity
Activity settings as a table.
Return Value
- Returns true on success.
Example
AddEvent("OnPackageStart", function()
local Activity = { }
Activity.state = "Test"
Activity.details = "Test2"
Activity.timestamps = { }
Activity.timestamps.start_time = 1594231268
Activity.timestamps.end_time = 0
Activity.assets = { }
Activity.assets.large_image = "avatar"
Activity.assets.large_text = "Test"
Activity.assets.small_image = ""
Activity.assets.small_text = ""
Activity.party = { }
Activity.party.id = ""
Activity.party.size = { }
Activity.party.size.current_size = 0
Activity.party.size.max_size = 0
Activity.secrets = { }
Activity.secrets.match = ""
Activity.secrets.join = ""
Activity.secrets.spectate = ""
Activity.instance = false
UpdateDiscordActivity(Activity)
end)