Skip to content

Plugin API

Setup

local plugin = assert(script:FindFirstAncestorWhichIsA("Plugin"), "Run this as a plugin!")
local Ethereal = require(plugin.Packages.Ethereal)
local et = Ethereal.permission(plugin, {
    id = "myFirstEtherealPlugin",
    name = "My First Ethereal Plugin",
    icon = "rbxassetid://1234567890",

    permissions = {}
})
    permissions = {
        Ethereal.Permissions.CreateTool
    }
et.createTool {
    id = _,
    name = _,
    overview = _,
    description = _,
    tags = _,

    args = _,

    run = _,
}
    id = "myFirstTool",
    name = "My First Tool",
    overview = "My First Tool",
    description = "My First Tool",
    tags = {},
    args = {
        {
            kind = "boolean",
            name = "boolArg",
            label = "Boolean Argument",
            default = true
        }
    },
    run = function(ctx)
        print("Hello Ethereal!")
    end
    run = function(ctx)
        ctx.onAction("Click me", function()
            print("Clicked!")
        end)
    end
    run = function(ctx)
        ctx.onAction("Click me", function()
            print("Clicked!")

            local boolArg = ctx:arg("boolArg"):assertBoolean():unwrap()
        end)
    end