LogoRobo.js

Thread templates

Customize Discord thread title formatting with template strings.

Thread title templates control how Discord thread names are formatted. Templates support placeholders for the card ID and title, with smart truncation that preserves the template structure.

Template format

Templates use two placeholders:

PlaceholderDescriptionExample value
{id}Card ID from the providerPROJ-123
{title}Card titleAdd dark mode support

Configuration

Global default

Set a default template for all guilds in your plugin config:

config/plugins/robojs/roadmap.ts
export default {
  threadTitleTemplate: '[{id}] {title}'
}
config/plugins/robojs/roadmap.js
export default {
  threadTitleTemplate: '[{id}] {title}'
}

Per-guild override

Override the global default for a specific guild:

import { updateSettings } from '@robojs/roadmap'

updateSettings(guildId, {
  threadTitleTemplate: '{id} - {title}'
})
import { updateSettings } from '@robojs/roadmap'

updateSettings(guildId, {
  threadTitleTemplate: '{id} - {title}'
})

Guild settings take precedence over the global plugin default.

Examples

TemplateResult
[{id}] {title}[PROJ-123] Add dark mode support
{id} - {title}PROJ-123 - Add dark mode support
{title} ({id})Add dark mode support (PROJ-123)
{id}PROJ-123
{title}Add dark mode support
(empty or undefined)Add dark mode support

Truncation behavior

Discord thread names have a 100-character limit. The template system truncates intelligently:

  • If the template contains {title}, only the title portion is truncated while preserving the rest of the template (including {id})
  • If the template doesn't contain {title}, the entire result is truncated
  • Truncation adds ... at the cut point

For example, with template [{id}] {title} and a 120-character title, the ID portion [PROJ-123] is preserved and only the title is shortened to fit within 100 characters.

Sync updates

Running /roadmap sync updates all existing thread titles to match the current template. This means you can change the template and re-sync to retroactively update all thread names.

Next steps

On this page