API

The client has a work-in-progress API that I've just begun creating, and here's the documentation for the existing functions.

To make a plugin for the client, simply insert a return function into a module and place the module in the 'Plugins' folder.

return function(api)
    --> client api :)
end

:getTopbarButton()

This method returns the Topbar+ button (docs here) used to open the settings menu.

api:getTopbarButton():setRight()

:getSetting(<container>,<settingName>)

For developers who want to create their own settings UI, they can use this method to access the values and change them accordingly'.

A boolean value setting would look like this:

{
    value = true,
    type = "boolean",
    changed = <signal> --> (:Connect)
    set = <function>
}

:set(<boolean>)

Call the :set() function with the boolean value to update it's state.

Example:

local setting = api:getSetting("UI","Resizable")
setting.changed:Connect(function(new)
    print(new)
end)
setting:set(false) --> disable resizable UI

:systemMessage(<text>)

This method displays a system message in the chat with the specified text.

api:systemMessage("What?")

:getQuickChatSlot(<number>)

If quick chat is enabled, you can pass a number from 1-20 to get the text in that specified quick chat slot.

api:getQuickChatSlot(1) --> nil/string

:saveToQuickChatSlot(<number>,<string>)

If quick chat is enabled, you can pass both a number and the text you want to save to the specified quick chat slot to be used later.

api:saveToQuickChatSlot(1,"hi")
-- now saying /1 in chat will send 'hi'

Last updated