Advanced behavior

Import and export JSON configurations

Install templates with questions, variants and shared matching.

The dashboard Import / Export page installs Auto Threads, Sticky Messages and AutoReact configurations together, using existing channels only. Files are limited to 64 KiB; the complete request, including answers, must also fit that limit. An import creates at most 50 configurations.

Workflow

  1. Choose a built-in example, drop a JSON file or paste its contents.
  2. Answer its questions and replace incompatible Discord references.
  3. Review the selected configurations, matching, naming and message previews; uncheck items to skip.
  4. Create the group. Configurations are saved paused, without publishing a sticky.

The server rechecks Discord permissions and resources. A creation failure rolls back the group’s profiles and configurations. Existing configurations are never overwritten: a channel with an existing sticky conflicts even when it is paused or still recoverable after deletion.

Then activate the configurations you want. Activation checks quotas; sticky publication is a separate Discord operation whose failure does not undo the import.

Use this template again retains common answers and clears channel choices to install it in another channel. Every import creates new configurations rather than updating previous ones.

Fixed channel destinations in JSON automatically become questions, defaulting to the current channel when accessible. A server-wide Auto Threads scope stays server-wide on export and import: "channelId": null does not create a channel question. Unavailable roles and emojis require replacement. This also lets you reuse a simple export in another channel without manually adding questions.

Simple export

Select configurations, then copy or download JSON. The file includes their settings and required shared profiles, without generated questions. Add questions and variants manually.

An export can contain configured messages, URLs, regexes and Discord identifiers supplied by an administrator. Review it before sharing. Secrets, webhook tokens, published-message identifiers and execution data are excluded. Private asset:// media is not transferred to another server: replace it or upload it again.

Version 1 structure

The JSON schema describes autothreads.config-template, version 1:

  • questions: questions in display order.
  • profiles: matching profiles with identifiers local to the file.
  • blocks: fixed configuration groups or variants.
  • Optional name and description: template presentation.
{
  "format": "autothreads.config-template",
  "version": 1,
  "name": "Voting",
  "questions": [
    { "id": "channel", "type": "channel", "label": "Channel", "required": true },
    { "id": "votes", "type": "boolean", "label": "Add voting?", "default": true }
  ],
  "profiles": {},
  "blocks": [
    {
      "id": "votes",
      "select": { "$answer": "votes" },
      "variants": {
        "false": null,
        "true": {
          "autoreact": {
            "name": "Votes",
            "channelId": { "$answer": "channel" },
            "emojis": ["👍", "👎"]
          }
        }
      }
    }
  ]
}

null as a variant means create no configuration. Inside an Auto Threads configuration, "channelId": null means Entire server; omitting channelId is invalid. A variant replaces its complete block, without implicit merging. Each variant can include autothreads, autoreact and stickyMessages, each as an object or an array of objects.

A fixed block uses values instead of select and variants. Add when to include it conditionally. A block cannot combine values and select.

Questions and conditions

Types: text, number, boolean, select, multiselect, channel, role, user, emoji, emojiList, message. A user question takes the ID of a guild member, including a bot.

Optional properties: description, required, default, min, max, visibleWhen. min and max constrain a number, text length or list length. Choices define options: [{ "value": "simple", "label": "Simple" }].

Conditional visibility can reference only earlier questions, preventing cycles. Hidden questions do not block the form and their answers are ignored. A selected block depending on a missing answer needs correction or a condition.

Available conditions:

{ "question": "votes", "equals": true }
{ "all": [{ "question": "mode", "equals": "advanced" }, { "question": "options", "includes": "sticky" }] }

any means OR, not inverts a condition, and { "question": "text", "present": true } checks for an answer. Variants accept a select or boolean question; boolean variants use "true" and "false" keys.

Answers and shared matching

{ "$answer": "channel" } replaces a complete value with an answer, including inside matching or naming trees. References are not interpolated inside strings. Naming variables such as {displayName}, {channelName}, {categoryName}, {guildName}, {channelId}, {messageId}, {date}, {time} and {capture.number} remain available. A category name may be unavailable; Auto Threads then tries the next naming rule.

Define a profile in profiles, then link it with:

{ "detectionProfileId": { "$profile": "suggestions" } }

A profile contains name, matchingDefinition and optional allowAutomatedMessages. Only profiles used by selected configurations are created. Without a profile, each configuration keeps independent rules.

Downloadable examples

Example sticky messages and custom thread welcomes use Components V2 by default and open in the visual editor.

  • Suggestions: custom sticky, autothread and voting variants sharing matching.
  • Help and questions: one thread per question, custom welcome, optional guidelines and friendly reaction.
  • Creative showcase: image/video matching, threads, optional reactions and sticky message.

Regexes use RE2. You can add regexes and custom naming to these templates. Imports execute no code and create no channels.

Referencing Auto Threads from a sticky

The format supports a sticky targeting a channel or an Auto Threads configuration. For the latter, stickyMessages.threadConfigId carries an $autothread marker whose value is the logical configuration key: the block identifier followed by :autothreads, and :n for the nth entry when a block contains multiple configurations. The sticky channel is absent or null. The referenced Auto Threads configuration must be included in the import selection; it is created before the sticky regardless of block order.

On export, the dashboard includes the selected parent and replaces its UUID with the portable reference. Per-thread state, published messages and webhooks are excluded. Existing channel-targeted sticky templates remain compatible.