Skip to content

Commit

Permalink
bugfix(actions): address actions breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
4x8Matrix committed Jul 1, 2024
1 parent 66c26b8 commit 57700fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions Src/Services/ActionService.luau
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function ActionService.RegisterActionAsync(self: ActionService, action: any)
requestBody.serverId = ApiService.JobId
requestBody.key = action.Key
requestBody.name = action.Name
requestBody.placeId = game.PlaceId
requestBody.placeVersion = game.PlaceVersion
requestBody.description = action.Description
requestBody.arguments = {}
Expand Down
17 changes: 14 additions & 3 deletions Tests/Development.server.luau
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,20 @@ MetrikSDK.Server:InitializeAsync({
}):andThen(function()
warn("Metrik SDK loaded!")

task.spawn(function()
error("example message: rbxasset://textures/ui/GuiImagePlaceholder.png eeee")
end)
local action = MetrikSDK.Server.ActionBuilder.new()
:SetName("Hello World")
:SetDescription("Prints 'Hello, World' with an option for another message")
:AddArgument("Message", {
Required = true,
Type = "string",
})
:Build()

function action:OnRun(message: string)
print("Hello, World")

print(message)
end
end):catch(function(exception)
warn("Metrik SDK failed: ", exception)
end)

0 comments on commit 57700fe

Please sign in to comment.