Skip to content

Discord Community

Preferences Namespace ​

Functions ​

FunctionParamsReturnDescription
:newname:stringPreferencesCreate new preferences instance
:load--Load preferences from file
:save--Save preferences to file
:getname:string, default:anyanyGet value by key with default fallback
:setname:string, value:any-Set value by key

Examples ​

lua
local pref = require("preferences")
pref:new("configFile")
pref:save()
pref:set("config", true)    
config = pref:get("config", false)
log(config)

Join our community for support and updates!