#12074: feat(discord): enhanced forum post creation with multi-tag support
channel: discord
agents
stale
Cluster:
Discord Message Enhancements
## 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
#9984: feat: Add Discord embed support to message action schema
by UltimateBrent · 2026-02-05
74.5%
#11920: Telegram: create forum topics via message tool (thread-create)
by larsderidder · 2026-02-08
73.6%
#22946: fix(discord): reject thread creation in thread/voice/stage channels
by iamhitarth · 2026-02-21
73.4%
#10712: feat(discord): add compact mode for message reads
by skoteskote · 2026-02-06
72.4%
#23158: discord: harden preflight/reply path against slow lookup latency
by danielstarman · 2026-02-22
72.0%
#12075: feat(browser): session-aware context isolation for multi-agent brow...
by xiaoyaner0201 · 2026-02-08
71.4%
#19274: feat(mattermost): enable threaded replies in channels
by rockinyp · 2026-02-17
71.2%
#22951: feat(discord): make thread session isolation configurable
by iamhitarth · 2026-02-21
71.1%
#22591: feat(cli): expose Discord channel lifecycle management through unif...
by yinghaosang · 2026-02-21
70.4%
#12204: fix(discord): resolve numeric guildId/channelId pairs in channel al...
by mcaxtr · 2026-02-09
70.2%