Skip to content

Feat: Discord message length check and auto split#143

Merged
lxowalle merged 3 commits intosipeed:mainfrom
Huaaudio:feat/discord-message-split
Feb 16, 2026
Merged

Feat: Discord message length check and auto split#143
lxowalle merged 3 commits intosipeed:mainfrom
Huaaudio:feat/discord-message-split

Conversation

@Huaaudio
Copy link
Collaborator

Description

Discord has a strict message length limit (2000 characters per message). This PR automatically splits long messages into multiple chunks when sending via Discord, preventing API errors when messages exceed the character limit.

Changes

  • Modified Discord message handler to check message length before sending
  • Added chunking logic to split long messages intelligently
  • Maintains markdown formatting integrity across chunks
  • Tested with:
    • Plain text
    • Markdown-formatted documents (headers, tables, code blocks, lists)

Notes

  • Edge cases to consider: Long code blocks, single long words (e.g., URLs)

@lxowalle
Copy link
Collaborator

Thanks for your contribution! We are forming the PicoClaw Dev Group to accelerate the evolution of the project. Any developer with more than one merged PR is invited to join.

Would you like to join the PicoClaw Dev Group? If so, please send an email to support@sipeed.com with the subject line: [Join PicoClaw Dev Group] + Your GitHub account. We will send the Discord invite link to your inbox.

@lxowalle lxowalle merged commit 32cb8fd into sipeed:main Feb 16, 2026
3 checks passed
edgargomero pushed a commit to edgargomero/kntorclaw that referenced this pull request Feb 16, 2026
* feat: discord message auto split

* make fmt

* chore: remove failing discord_test.go

---------

Co-authored-by: Hua <zhangmikoto@gmail.com>
hahnavi pushed a commit to hahnavi/picoclaw that referenced this pull request Feb 16, 2026
* feat: discord message auto split

* make fmt

* chore: remove failing discord_test.go

---------

Co-authored-by: Hua <zhangmikoto@gmail.com>
emadomedher pushed a commit to emadomedher/picoclaw that referenced this pull request Feb 17, 2026
* feat: discord message auto split

* make fmt

* chore: remove failing discord_test.go

---------

Co-authored-by: Hua <zhangmikoto@gmail.com>
@Huaaudio Huaaudio deleted the feat/discord-message-split branch February 18, 2026 19:50
@Huaaudio Huaaudio mentioned this pull request Feb 18, 2026
5 tasks
Huaaudio added a commit that referenced this pull request Feb 18, 2026
hahnavi pushed a commit to hahnavi/picoclaw that referenced this pull request Feb 19, 2026
* feat: discord message auto split

* make fmt

* chore: remove failing discord_test.go

---------

Co-authored-by: Hua <zhangmikoto@gmail.com>
SebastianBoehler pushed a commit to SebastianBoehler/picoclaw that referenced this pull request Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants