Settings

Add typed per-presence settings with boolean, input, select, and slider controls.

What Settings Are

Settings let users customize how a presence behaves without editing code.

Supported Setting Types

Nowly supports boolean, input, select, and slider settings.

FieldTypeDescriptionDefault
booleanbooleanToggle for enabled/disabled options.-
inputstringFree-form text value.-
selectstringOne value selected from predefined options.-
slidernumberNumeric value with optional min, max, and step.-

Defining Settings

Use Presence.Settings to define typed settings:

const settings = Presence.Settings({
  showButtons: {
    type: "boolean",
    default: true,
    label: {
      "en-US": "Show buttons"
    }
  }
})

Reading Settings

Use getSetting at runtime. Values come from the user's saved settings, falling back to the defaults from Presence.Settings. Live changes from the side panel arrive as SETTINGS_UPDATED and update the same map.

You can also read the current map from ctx.settings in UpdateData:

presence.on("UpdateData", async (ctx) => {
  const showButtons = await presence.getSetting<boolean>("showButtons")
  // same value: ctx.settings.showButtons
})

Localized Labels

Setting labels and descriptions use the same locale keys used in metadata.

Defaults

Choose safe defaults. A presence should work immediately after installation without requiring configuration.