Files
cc-connect/platform
Shawn 2320e5d950 fix(discord): use SplitMessageCodeFenceAware in interaction responses (#195)
sendInteraction splits messages using byte length (len) and slices at
byte offsets, which can cut multi-byte UTF-8 characters (emoji, CJK)
in half, producing invalid strings. This causes Discord API errors or
garbled messages.

Replace the inline byte-based splitting with SplitMessageCodeFenceAware,
which is already used by sendChannelReply and sendChannel. This also
gives interaction responses proper code fence handling for free.

Remove the now-unused lastIndexBefore helper.
2026-03-18 15:26:47 +08:00
..