SIGN IN SIGN UP

feat: add --json and --message-file to messages send, edit, and draft (#152)

Gives the message-writing commands scriptable output so automation can keep what it just wrote instead of scraping the human success line. --json emits {channel_id, ts, permalink} on send, {channel_id, file_id} on send --file, {channel_id, ts} on edit and {channel_id, draft_id, thread_ts?} on draft. --message-file reads the body from a UTF-8 file on all three, mutually exclusive with --message, with a missing, empty or whitespace-only file rejected before any Slack call.

warning() now writes to stderr rather than stdout, so a pre-send workspace-mismatch warning can no longer corrupt a --json pipe; a formatter test pins it. --message is demoted from requiredOption on send, edit and draft, with the exactly-one rule enforced in resolveMessageText before the first API call. Adds getPermalink() (chat.getPermalink takes message_ts, not ts) and narrows uploadFileExternal()'s return type. Drops the grep -oE workaround from the scripting guide.

Closes #150
R
Rafael Braga committed
481b63fdbe5c24e30d029b6834a182ead82d87f5
Parent: 8a4a035
Committed by GitHub <noreply@github.com> on 9/2/2026, 7:13:37 PM