# User settings

# Script User Settings

Most scripts are designed to be **configurable** by the user. These configurable options can include things like group names, custom messages, and other parameters.


:::info
**Note:** The user’s **bot name** is not a setting. The user selects which bot to use when purchasing your script.

:::

# Configuring Settings

 ![](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/fe746996-bd68-4ba8-a15e-e239ddd741be/e3acb332-1754-4618-995f-2d39f19cf4b4/Store-user-settings-1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20261116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261116T154500Z&X-Amz-Expires=86400&X-Amz-Signature=e029dbeef891bbf890236535b7ec46e8decd65c7232a39d56b8c9dbe52989828&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject "left-50 =781x433")

When defining user settings, you specify three values:


1. **Variable name** — how your script references the setting.
2. **Friendly name** — how the setting appears to the user.
3. **Optional hint** — a short description to help the user.


:::warning
All settings are stored as string values. If you need a number or UUID, you should convert it appropriately within your script.

:::

# Accessing User Settings from Script

User settings can be accessed via the global `userSettings` object:

```javascript
console.log("Using group: " + userSettings.group_name);
```

## Example: Setting Defaults

An easy way to define default values is by using `Object.assign()`.

```javascript
// Define the default settings here.
const defaultSettings = {
  greetingMessage: "Hello, welcome!",
  repeatCount: 2,
  enableLogging: false
};

// Merge defaults with any values provided by the user.
const settings = Object.assign({}, defaultSettings, userSettings);

// Access the settings.
console.log(settings.greetingMessage);
```

# Specifying Settings While Developing Scripts

While developing your script, you can specify custom test values for user settings on the **Settings** tab:

 ![](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/fe746996-bd68-4ba8-a15e-e239ddd741be/4ecbe61e-9559-49eb-8f32-4fc2682c0997/Store-user-settings-2.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20261116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261116T154500Z&X-Amz-Expires=86400&X-Amz-Signature=976e49c3047269f91d7583cada3e7003c1ed99348560ee4455b7a754129e73f7&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject "left-50 =781x433")

New settings will automatically appear here after you add them on the **Bot Store → User Settings** screen.

# Asking the User for Settings

After purchasing the script, users see a configuration panel for their settings:

 ![](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/fe746996-bd68-4ba8-a15e-e239ddd741be/01b90220-3ef0-4dce-b38c-6c4f7034ffa6/Store-user-settings-3.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20261116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261116T154500Z&X-Amz-Expires=86400&X-Amz-Signature=4373aef57821ed9ffff1f3223a16e1274b1b4deaf321b19393846b6f0b9f523f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject "left-50 =781x433")

# Settings and Releases

When you publish a new release, the list of settings is saved with that release. This means future changes to user settings won’t affect existing script versions:  

 ![](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/fe746996-bd68-4ba8-a15e-e239ddd741be/3d0e1776-67b6-4cb7-b7c2-44aab759dca0/Store-user-settings-4.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20261116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261116T154500Z&X-Amz-Expires=86400&X-Amz-Signature=91caf32d527b0d289bd55e87e2220e672b2bbf7ca7ac1aed6047274e5bf14f89&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject "left-50 =514x187")







You can safely rename, add, or remove settings when updating your script — previously purchased versions will continue to function normally.