Skip to content

Discord: chunk outbound messages by chars + lines#371

Closed
jdrhyne wants to merge 1 commit intoopenclaw:mainfrom
jdrhyne:fix/discord-chunk-lines
Closed

Discord: chunk outbound messages by chars + lines#371
jdrhyne wants to merge 1 commit intoopenclaw:mainfrom
jdrhyne:fix/discord-chunk-lines

Conversation

@jdrhyne
Copy link
Copy Markdown
Contributor

@jdrhyne jdrhyne commented Jan 7, 2026

Fixes Discord messages appearing clipped/truncated in-channel by chunking outbound Discord replies by both the 2000 character limit and a soft line limit.

Changes:

  • Add Discord-specific chunker that respects max chars + max lines and keeps fenced code blocks balanced.
  • Wire chunker into Discord provider outbound sends.
  • Add config discord.maxLinesPerMessage.

AI-assisted: yes (Codex).
Testing: npm test -- src/discord/chunk.test.ts src/config/config.test.ts; npm run lint.

Prevents Discord client clipping by splitting tall replies; adds discord.maxLinesPerMessage.
@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 7, 2026

Thanks Jonathan! You gotta pull more often :)
Do you have a screenshot of the issue? I need to research if this really only needs to be special-cased by Discord or if we should weave this in a a general thing.

@steipete steipete added the bug Something isn't working label Jan 7, 2026
@jdrhyne
Copy link
Copy Markdown
Contributor Author

jdrhyne commented Jan 7, 2026

Sorry for not pulling...I think I've mixed up the repo, with my personal stuff as you cautioned against in the docs. Here's a screenshot of it clipping -
Screenshot 2026-01-07 at 1 41 01 AM

@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 8, 2026

Landed by rebasing onto main and fast-forwarding main to bf2daeb. Tests: pnpm lint && pnpm build && CI=1 pnpm test.

@steipete steipete closed this Jan 8, 2026
steipete added a commit that referenced this pull request Jan 8, 2026
@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 8, 2026

Merged via merge commit 60a59ed (parents 0af3af3, 596fa99). No content diffs; PR changes already on main. Tests: pnpm lint && pnpm build && pnpm test.

dgarson added a commit to dgarson/clawdbot that referenced this pull request Feb 9, 2026
* Web: unify channel config settings

* Web: restore channel settings loading states
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants