docs: document 🦀send command (whatsapp-rust#875) - #338
Conversation
- Add changelog/2026-06-15-send-command.mdx describing the new command - Update quickstart.mdx demo bot description and complete example to include SEND_TRIGGER constant, refactored handle_message, and handle_send_command function - Register the new changelog page in docs.json
📝 WalkthroughWalkthroughA new changelog entry for June 15, 2026 documents the ChangesSend Command Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@changelog/2026-06-15-send-command.mdx`:
- Around line 6-10: Convert the changelog entry from third-person to
second-person voice to align with documentation standards. Rewrite the text
starting with "PR [`#875`]" on line 6 and the paragraph under "## What changed" on
line 10 to use second-person perspective (e.g., "you can now" instead of "the
example bot now"). Keep the ## What changed subheading unchanged and preserve
all technical details about the send command, JID types, and the
ctx.reply_quoting functionality while switching the narrative voice.
In `@quickstart.mdx`:
- Around line 271-272: The documentation at lines 271-272 uses third-person
voice ("The demo bot responds...") instead of the required second-person
perspective. Rewrite this prose using "you" phrasing to address the reader
directly, making it consistent with documentation standards. The same
third-person voice issue applies at lines 352-353, so rewrite that section
similarly to use second-person perspective.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3de29ea7-c4d9-4d80-8eda-9e99e732c6ff
📒 Files selected for processing (3)
changelog/2026-06-15-send-command.mdxdocs.jsonquickstart.mdx
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 054bd81231
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if let Some(args) = text.strip_prefix(SEND_TRIGGER) { | ||
| handle_send_command(&ctx, args).await; |
There was a problem hiding this comment.
Gate relay commands on non-self messages
When the relayed text itself starts with 🦀send, this branch will also run for the bot's own sent-message fanout unless the handler checks ctx.info.source.is_from_me first. A user can send one nested relay command and have the bot reinterpret its own relayed message as another command, causing unintended extra sends (or command chains) from the bot account; add a self-message guard before dispatching handle_send_command.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
1 issue found across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Follows whatsapp-rust#875, which added a
🦀send <jid> <text>command to the demo bot insrc/main.rs.\n\n## Changes\n\n-changelog/2026-06-15-send-command.mdx— new changelog entry explaining the command, its output format, and implementation notes (let-else refactor,split_onceparsing, error logging)\n-quickstart.mdx— two updates:\n - Demo binary CLI flags description now mentions🦀sendalongside🦀ping\n - "Complete example with logging" code block updated to match the realsrc/main.rs: addsSEND_TRIGGERconstant, refactorshandle_messageto use the let-else guard, and addshandle_send_command\n-docs.json— registerschangelog/2026-06-15-send-commandat the top of the changelog tabGenerated by Claude Code
Summary by cubic
Document the new
🦀send <jid> <text>demo-bot command fromwhatsapp-rust#875that relays text to any JID and reports send latency to the originating chat.Update
quickstart.mdxto matchsrc/main.rs(addSEND_TRIGGER,handle_send_command, and alet-elseguard, and remove the inaccurate “message editing” claim), add a focused changelog entry withdocs.jsonregistration, and switch both pages to second-person voice.Written for commit bfe90ea. Summary will update on new commits.
Summary by CodeRabbit