Skip to content

Commit 57700fe

Browse files
committed
bugfix(actions): address actions breaking
1 parent 66c26b8 commit 57700fe

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Src/Services/ActionService.luau

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ function ActionService.RegisterActionAsync(self: ActionService, action: any)
3232
requestBody.serverId = ApiService.JobId
3333
requestBody.key = action.Key
3434
requestBody.name = action.Name
35+
requestBody.placeId = game.PlaceId
3536
requestBody.placeVersion = game.PlaceVersion
3637
requestBody.description = action.Description
3738
requestBody.arguments = {}

Tests/Development.server.luau

+14-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,20 @@ MetrikSDK.Server:InitializeAsync({
1212
}):andThen(function()
1313
warn("Metrik SDK loaded!")
1414

15-
task.spawn(function()
16-
error("example message: rbxasset://textures/ui/GuiImagePlaceholder.png eeee")
17-
end)
15+
local action = MetrikSDK.Server.ActionBuilder.new()
16+
:SetName("Hello World")
17+
:SetDescription("Prints 'Hello, World' with an option for another message")
18+
:AddArgument("Message", {
19+
Required = true,
20+
Type = "string",
21+
})
22+
:Build()
23+
24+
function action:OnRun(message: string)
25+
print("Hello, World")
26+
27+
print(message)
28+
end
1829
end):catch(function(exception)
1930
warn("Metrik SDK failed: ", exception)
2031
end)

0 commit comments

Comments
 (0)