Skip to main content

Function: formatCardContent()

function formatCardContent(
card,
guildId,
guild?,
maxLength?): Promise<string>

Formats a roadmap card into Discord message content with automatic truncation.

Includes description and metadata (assignees, labels, last updated). Content is truncated to respect Discord limits (2000 for forum thread starter messages and message edits). Assignees are redacted - only mapped Discord users are mentioned, and Jira names are never shown.

Parameters​

ParameterTypeDefault valueDescription
cardRoadmapCardundefinedThe roadmap card to format.
guildIdstringundefinedThe Discord guild ID for looking up assignee mappings.
guild?anyundefinedOptional guild object for validating Discord user existence.
maxLength?number2000Maximum character limit (default: 2000).

Returns​

Promise<string>

Formatted message content.

Example​

const content = formatCardContent(card, guildId, guild, 2000);