← Back to PRs

#12074: feat(discord): enhanced forum post creation with multi-tag support

by xiaoyaner0201 open 2026-02-08 20:22 View on GitHub →
channel: discord agents stale
## Summary Adds enhanced support for creating Discord **Forum posts** using the `thread-create` action, with improved tag handling. ## What changed ### From PR #3023 (by @Solvely-Colin): - Accept optional initial post `message` content for `thread-create` (required by Discord for forum posts) - Accept optional `appliedTagIds` to apply forum tags - Use `POST /channels/{channelId}/threads` when creating a forum post - Support `embeds` and `components` in message tool send ### Additional improvements: - **Enhanced `readStringArrayParam`** to support multiple input formats: - JSON array strings: `["tag1", "tag2"]` - Comma-separated strings: `tag1, tag2` - Native arrays (existing) - Single values (existing) ## Why 1. Forum channels require an initial message payload. Without it, Discord returns a generic "This field is required" error 2. The original PR #3023 used `Array.isArray()` for tag detection, which doesn't work well with tool parameter passing (often receives JSON strings) 3. Supporting comma-separated format makes it easier for LLMs and users to specify multiple tags ## Usage ```js // Create forum post with tags (JSON array format) message({ action: "thread-create", channelId: "forum-channel-id", threadName: "Post Title", message: "Post content...", appliedTagIds: '["tag1", "tag2"]' }) // Or with comma-separated format message({ action: "thread-create", channelId: "forum-channel-id", threadName: "Post Title", message: "Post content...", appliedTagIds: 'tag1, tag2' }) ``` ## Testing - ✅ Forum post creation without tags - ✅ Forum post creation with single tag - ✅ Forum post creation with multiple tags (JSON format) - ✅ Forum post creation with multiple tags (comma-separated) ## Related - Builds upon and improves PR #3023 by @Solvely-Colin <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR expands Discord tooling to better support forum post creation via `thread-create` by allowing an initial post `message` (mapped to `content`) and parsing `appliedTagIds` from arrays, JSON array strings, or comma-separated strings. It also extends Discord message sending to pass through provider-specific `embeds` and `components`. Key integration points are the message tool/action parameter parsing (`readStringArrayParam`, message-tool schema) and the Discord adapter implementations (`createThreadDiscord`, `sendDiscordText`/`sendDiscordMedia`). <h3>Confidence Score: 3/5</h3> - This PR is close to mergeable but has a couple of behavior changes that will break existing Discord thread/media send flows. - Score reduced due to an unconditional error path in `createThreadDiscord` that will now reject thread creation without a `messageId` even for non-forum channels, and because `components` are not consistently applied across chunked media sends (silent behavior change). The rest of the changes are straightforward parameter parsing/schema widening. - src/discord/send.messages.ts, src/discord/send.shared.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs