Skip to content

eng updates + BR translation#5

Open
purpshell wants to merge 1 commit into
mainfrom
docs/jids-socket-config-ptbr
Open

eng updates + BR translation#5
purpshell wants to merge 1 commit into
mainfrom
docs/jids-socket-config-ptbr

Conversation

@purpshell
Copy link
Copy Markdown
Member

@purpshell purpshell commented May 10, 2026

Summary by CodeRabbit

Documentation

  • Added comprehensive Portuguese (Brazilian) documentation covering installation, quickstart, authentication, messaging, features, advanced topics, concepts, migrations, and community sections.
  • Enhanced multi-language support in docs navigation configuration to support English and Portuguese-BR.
  • Improved existing documentation with clarifications on QR code deprecation warnings, LID/PNJID terminology, history synchronization options, and browser identity presets.

Review Change Stack

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 10, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whiskeysockets 🟢 Ready View Preview May 10, 2026, 2:46 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

📝 Walkthrough

Walkthrough

This PR significantly expands the Baileys documentation by introducing comprehensive Portuguese (Brazil) translations across the entire project structure while simultaneously improving English documentation with clearer terminology around Linked Identifiers (LID/LIDJID), deprecating the printQRInTerminal option in favor of event-driven QR rendering, and enhancing socket configuration guidance.

Changes

Documentation Internationalization & Terminology Clarification

Layer / File(s) Summary
Navigation Configuration
docs.json
Multi-language support: restructured tabs into languages array with English (default) and Portuguese-BR localizations.
English: Deprecation & LID Clarification
authentication/qr-code.mdx, concepts/jids.mdx, concepts/socket-config.mdx, faq.mdx, migration/v7.mdx
Deprecated printQRInTerminal, standardized LIDJID/PNJID terminology, documented PN↔LID duality and resolution, expanded browser preset guidance, and updated socket configuration examples.
Portuguese: Getting Started
pt-BR/introduction.mdx, pt-BR/installation.mdx, pt-BR/quickstart.mdx
Complete introduction, installation requirements (Node.js 20+), and quickstart example covering auth state setup, QR handling, message reception, and credential persistence.
Portuguese: Authentication
pt-BR/authentication/qr-code.mdx, pt-BR/authentication/pairing-code.mdx, pt-BR/authentication/session-management.mdx
QR code flow, 8-digit pairing code alternative, and persistent session management using useMultiFileAuthState and BufferJSON serialization with database backend patterns.
Portuguese: Core Concepts
pt-BR/concepts/jids.mdx, pt-BR/concepts/socket-config.mdx, pt-BR/concepts/events.mdx, pt-BR/concepts/data-store.mdx
JID formats and resolution (PNJID/LIDJID), socket configuration options and presets, event system with sock.ev.process() pattern, and in-memory/SQLite/Redis data store implementations with getMessage callback.
Portuguese: Messaging & Features
pt-BR/messaging/*, pt-BR/features/groups.mdx, pt-BR/features/presence.mdx, pt-BR/features/privacy.mdx, pt-BR/features/broadcasts-stories.mdx
Chat management (chatModify), media sending/downloading, message actions (delete, edit, read status), group operations (create, manage participants, invite codes), presence subscriptions, privacy settings, and broadcast/story publishing with limitations.
Portuguese: Advanced & Community
pt-BR/advanced/*, pt-BR/community/*, pt-BR/faq.mdx, pt-BR/migration/v7.mdx, pt-BR/migration/v8.mdx
Call handling (detect/reject), custom WebSocket callbacks and debug logging, history synchronization patterns, 9-category troubleshooting guide, USync protocol usage, contribution guidelines, sponsorship info, translation priorities, migration breaking changes for v7/v8, and FAQ covering affiliation, LID concepts, caching, and performance tuning.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • WhiskeySockets/docs#2: Addresses the same printQRInTerminal deprecation and QR event-driven rendering guidance in authentication/qr-code.mdx, indicating parallel documentation improvement efforts.

Poem

🐰 The docs hop forth in English clear,
Then bound to Portuguese far and near,
LIDs and PNs now named just right,
QR codes render pure delight,
With socket configs shining bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'eng updates + BR translation' accurately reflects the two main categories of changes: English documentation updates and new Portuguese (BR) translation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/jids-socket-config-ptbr

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Nitpick comments (6)
authentication/qr-code.mdx (1)

54-55: ⚡ Quick win

Rewrite this paragraph in second person for style consistency.

This paragraph is informative, but it currently reads in third person. Reword it to address the reader directly (for example, “The browser identity you set…”).

As per coding guidelines, "Use active voice and second person ('you') in documentation writing".

🤖 Prompt for 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.

In `@authentication/qr-code.mdx` around lines 54 - 55, Rewrite the paragraph in
authentication/qr-code.mdx to use second person and active voice: change the
current third-person phrasing about "The browser identity Baileys presents to
WhatsApp..." to address the reader directly (e.g., "The browser identity you set
in the socket determines how your client appears in Linked Devices and how much
message history is delivered on first sync"), and keep the references to the
socket, the Browsers presets, and the syncFullHistory flag intact (see Configure
the Baileys socket connection).
pt-BR/introduction.mdx (1)

6-10: 🏗️ Heavy lift

Align opening paragraphs with second-person voice.

The intro currently uses mostly third-person exposition. Consider rewriting to directly address the reader (“você”) for consistency with the docs voice.

As per coding guidelines, "Use active voice and second person ('you') in documentation writing".

🤖 Prompt for 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.

In `@pt-BR/introduction.mdx` around lines 6 - 10, Reescreva os parágrafos de
abertura para usar voz ativa e segunda pessoa, direcionando o texto ao leitor;
por exemplo, transforme descrições em frases como "Você pode usar a Baileys..."
em vez de terceira pessoa; atualize o bloco introdutório que começa com "Baileys
é uma biblioteca TypeScript..." e o subtítulo "## O que você pode construir"
para manter consistência de voz, trocar construções passivas/terceira pessoa por
instruções/benefícios diretos ao leitor, e verifique que termos-chave e exemplos
permanecem intactos.
pt-BR/quickstart.mdx (1)

6-6: ⚡ Quick win

Split the opening paragraph into shorter one-idea sentences.

Line 6 packs several actions into one long sentence. Splitting it improves scanability for quickstart readers.

As per coding guidelines, "Keep sentences concise with one idea per sentence in documentation".

🤖 Prompt for 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.

In `@pt-BR/quickstart.mdx` at line 6, The opening paragraph in
pt-BR/quickstart.mdx is one long sentence that combines multiple actions; split
it into shorter sentences each expressing a single idea (e.g., "Este guia mostra
como criar uma aplicação Baileys mínima que conecta ao WhatsApp.", "A aplicação
persiste sua sessão.", "Ela escuta mensagens recebidas e responde a elas.", "Ao
final, você terá um bot funcional que pode estender com sua própria lógica.") so
each sentence is concise and focused to improve scanability.
pt-BR/authentication/qr-code.mdx (1)

6-6: ⚡ Quick win

Use direct second-person voice in the intro.

The opening paragraph is mostly descriptive; rewriting it to address the reader directly (“você…”) will align with the docs voice used elsewhere.

As per coding guidelines, "Use active voice and second person ('you') in documentation writing".

🤖 Prompt for 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.

In `@pt-BR/authentication/qr-code.mdx` at line 6, Rewrite the opening paragraph to
use direct second-person voice (você) and active phrasing while keeping the same
technical details (mentioning the QR string from the connection.update event and
how to render it). Specifically, change the current descriptive sentences to
imperative/you-directed sentences so they address the reader (e.g., "Você
receberá uma string de QR..." instead of "O Baileys emite..."), keep the
instructions to open WhatsApp → Aparelhos conectados → escanear para vincular,
and preserve references to rendering the QR in terminal, imagem ou frontend;
update only the intro paragraph in qr-code.mdx.
pt-BR/messaging/chat-management.mdx (1)

3-3: ⚡ Quick win

Format API names as code in the description.

Use backticks for chatModify in Line 3 to keep API references consistent and scannable.

As per coding guidelines, "Use code formatting for file names, commands, paths, and code references in documentation".

🤖 Prompt for 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.

In `@pt-BR/messaging/chat-management.mdx` at line 3, In the description metadata
string replace the plain API name chatModify with a code-formatted version by
enclosing it in backticks (`chatModify`) so API references are consistent and
scannable; update the description value from "Use chatModify para ..." to "Use
`chatModify` para ..." in the chat-management.mdx description metadata.
pt-BR/advanced/troubleshooting.mdx (1)

42-42: ⚡ Quick win

Verify path reference formatting.

The folder path auth_info_baileys/ should be formatted as code when referenced in prose text. As per coding guidelines, file names, commands, and paths should use code formatting in documentation.

Looking at the context, this appears to already be handled correctly in the Note section below (line 51), but verify the formatting is consistent throughout.

🤖 Prompt for 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.

In `@pt-BR/advanced/troubleshooting.mdx` at line 42, The reference to the folder
auth_info_baileys/ should be formatted as inline code in the prose (use the same
backtick-style code formatting used later in the Note for consistency); update
the occurrence in the sentence "Se o QR nunca aparece..." to use inline code
formatting for auth_info_baileys/ and scan the rest of troubleshooting.mdx for
any other occurrences to ensure consistent code formatting of file names,
commands, and paths.
🤖 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 `@pt-BR/community/sponsor.mdx`:
- Line 10: Split the long CTA sentence into two or three shorter sentences so
each conveys one idea: 1) state that readers can sponsor Baileys via the
provided link, 2) note that purpshell.dev is the current active maintainer, and
3) mention that both one-time and recurring sponsorships are supported; update
the sentence containing "Você pode patrocinar... purpshell é o mantenedor ativo
atual. Tanto patrocínios únicos..." accordingly to improve clarity and
scanability.

In `@pt-BR/community/translations.mdx`:
- Line 6: Rewrite the intro sentence that currently ends with “crowdsourcing
traduções” to use active voice and second person; replace the awkward phrase
with a natural PT-BR alternative (e.g., change "Esta documentação é escrita em
inglês. Queremos torná-la acessível ao maior número possível de pessoas
desenvolvedoras crowdsourcing traduções." to a version using "você" and
"traduções colaborativas" or similar) so the sentence flows naturally and
follows the guideline to use active voice/second person.

In `@pt-BR/concepts/events.mdx`:
- Around line 327-331: The example references getMessage inside the
events['messages.update'] handler but getMessage is not defined in the example,
causing the snippet to be non-runnable; add a minimal implementation or import
of getMessage (e.g., a helper function that accepts key and returns the stored
message or calls the SDK client) and ensure it is declared/visible in the same
scope as the event loop so the pollCreation assignment (const pollCreation =
await getMessage(key)) resolves correctly; update the example to either define
async function getMessage(key) { ... } or replace the call with the appropriate
client method used elsewhere in the sample.

In `@pt-BR/concepts/socket-config.mdx`:
- Around line 15-24: The snippet calls makeCacheableSignalKeyStore(state.keys,
logger) but logger is not defined; declare a logger before use (e.g., create a
Pino logger via the imported P from 'pino' and assign it to a const named
logger) and then pass that logger into makeCacheableSignalKeyStore so the auth
block for makeWASocket has a defined logger; locate this near the top where
useMultiFileAuthState and makeWASocket are used (symbols:
makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState, state).

In `@pt-BR/features/privacy.mdx`:
- Line 97: Replace the English label "Off" in the duration table row that
currently reads "| Off | `0` |" with a Portuguese term such as "Desativado" to
localize the pt-BR privacy page; update the table entry text so it becomes "|
Desativado | `0` |" ensuring consistency with other pt-BR labels in the
document.

In `@pt-BR/messaging/chat-management.mdx`:
- Around line 137-139: There are two duplicate declarations of const ppUrl in
the profile-picture snippet causing a TypeScript redeclaration error; keep a
single declaration for ppUrl and call sock.profilePictureUrl only once with the
desired argument (e.g., sock.profilePictureUrl(jid, 'image') for high
resolution) or rename the second variable if you intend to preserve both
values—update the code around the ppUrl declarations (references to ppUrl and
the sock.profilePictureUrl calls) so only one const is declared in that scope.

In `@pt-BR/messaging/media-messages.mdx`:
- Around line 66-86: The example is inconsistent: the ffmpeg command produces
output.ogg but the sendMessage uses './Media/audio.mp3' with mimetype
'audio/mp4'; update them to match: either change the ffmpeg invocation to
produce an MP3/MP4 file and keep './Media/audio.mp3' with mimetype 'audio/mp4'
in the sendMessage call, or change the sendMessage audio URL to
'./Media/output.ogg' and set mimetype to the correct OGG/Opus value (e.g.,
'audio/ogg; codecs=opus') and ensure the ffmpeg flags (codec libopus, ac 1,
avoid_negative_ts make_zero) are used consistently.

In `@pt-BR/messaging/message-actions.mdx`:
- Line 9: The example contains a typo in the message text: change the string
passed to sock.sendMessage in the const msg = await sock.sendMessage(jid, {
text: 'hello word' }) example to the conventional 'hello world' so the sample
output is correct and idiomatic.

In `@pt-BR/messaging/sending-messages.mdx`:
- Around line 21-27: Update the sample messages to fix the typo: change the text
payload in both sendMessage examples from 'hello word' to 'hello world' (the two
occurrences using await sock.sendMessage(jid, { text: 'hello word' }) and await
sock.sendMessage(jid, { text: 'hello word' }, { quoted: message })). Ensure both
string literals are corrected.
- Around line 73-75: The sendMessage call uses an undefined variable id instead
of the page's consistent jid; update the call to use jid (i.e., pass jid as the
recipient) in the sock.sendMessage invocation and ensure any examples or
surrounding text reference jid consistently (look for the sock.sendMessage call
and the variable named jid in the example).

---

Nitpick comments:
In `@authentication/qr-code.mdx`:
- Around line 54-55: Rewrite the paragraph in authentication/qr-code.mdx to use
second person and active voice: change the current third-person phrasing about
"The browser identity Baileys presents to WhatsApp..." to address the reader
directly (e.g., "The browser identity you set in the socket determines how your
client appears in Linked Devices and how much message history is delivered on
first sync"), and keep the references to the socket, the Browsers presets, and
the syncFullHistory flag intact (see Configure the Baileys socket connection).

In `@pt-BR/advanced/troubleshooting.mdx`:
- Line 42: The reference to the folder auth_info_baileys/ should be formatted as
inline code in the prose (use the same backtick-style code formatting used later
in the Note for consistency); update the occurrence in the sentence "Se o QR
nunca aparece..." to use inline code formatting for auth_info_baileys/ and scan
the rest of troubleshooting.mdx for any other occurrences to ensure consistent
code formatting of file names, commands, and paths.

In `@pt-BR/authentication/qr-code.mdx`:
- Line 6: Rewrite the opening paragraph to use direct second-person voice (você)
and active phrasing while keeping the same technical details (mentioning the QR
string from the connection.update event and how to render it). Specifically,
change the current descriptive sentences to imperative/you-directed sentences so
they address the reader (e.g., "Você receberá uma string de QR..." instead of "O
Baileys emite..."), keep the instructions to open WhatsApp → Aparelhos
conectados → escanear para vincular, and preserve references to rendering the QR
in terminal, imagem ou frontend; update only the intro paragraph in qr-code.mdx.

In `@pt-BR/introduction.mdx`:
- Around line 6-10: Reescreva os parágrafos de abertura para usar voz ativa e
segunda pessoa, direcionando o texto ao leitor; por exemplo, transforme
descrições em frases como "Você pode usar a Baileys..." em vez de terceira
pessoa; atualize o bloco introdutório que começa com "Baileys é uma biblioteca
TypeScript..." e o subtítulo "## O que você pode construir" para manter
consistência de voz, trocar construções passivas/terceira pessoa por
instruções/benefícios diretos ao leitor, e verifique que termos-chave e exemplos
permanecem intactos.

In `@pt-BR/messaging/chat-management.mdx`:
- Line 3: In the description metadata string replace the plain API name
chatModify with a code-formatted version by enclosing it in backticks
(`chatModify`) so API references are consistent and scannable; update the
description value from "Use chatModify para ..." to "Use `chatModify` para ..."
in the chat-management.mdx description metadata.

In `@pt-BR/quickstart.mdx`:
- Line 6: The opening paragraph in pt-BR/quickstart.mdx is one long sentence
that combines multiple actions; split it into shorter sentences each expressing
a single idea (e.g., "Este guia mostra como criar uma aplicação Baileys mínima
que conecta ao WhatsApp.", "A aplicação persiste sua sessão.", "Ela escuta
mensagens recebidas e responde a elas.", "Ao final, você terá um bot funcional
que pode estender com sua própria lógica.") so each sentence is concise and
focused to improve scanability.
🪄 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

Run ID: e853ac2f-88ff-4c11-a06b-fbf38659601f

📥 Commits

Reviewing files that changed from the base of the PR and between 5867a30 and 235e3fb.

📒 Files selected for processing (35)
  • authentication/qr-code.mdx
  • concepts/jids.mdx
  • concepts/socket-config.mdx
  • docs.json
  • faq.mdx
  • migration/v7.mdx
  • pt-BR/advanced/calls.mdx
  • pt-BR/advanced/custom-functionality.mdx
  • pt-BR/advanced/history-sync.mdx
  • pt-BR/advanced/troubleshooting.mdx
  • pt-BR/advanced/usync.mdx
  • pt-BR/authentication/pairing-code.mdx
  • pt-BR/authentication/qr-code.mdx
  • pt-BR/authentication/session-management.mdx
  • pt-BR/community/contributing.mdx
  • pt-BR/community/sponsor.mdx
  • pt-BR/community/translations.mdx
  • pt-BR/concepts/data-store.mdx
  • pt-BR/concepts/events.mdx
  • pt-BR/concepts/jids.mdx
  • pt-BR/concepts/socket-config.mdx
  • pt-BR/faq.mdx
  • pt-BR/features/broadcasts-stories.mdx
  • pt-BR/features/groups.mdx
  • pt-BR/features/presence.mdx
  • pt-BR/features/privacy.mdx
  • pt-BR/installation.mdx
  • pt-BR/introduction.mdx
  • pt-BR/messaging/chat-management.mdx
  • pt-BR/messaging/media-messages.mdx
  • pt-BR/messaging/message-actions.mdx
  • pt-BR/messaging/sending-messages.mdx
  • pt-BR/migration/v7.mdx
  • pt-BR/migration/v8.mdx
  • pt-BR/quickstart.mdx


## Como patrocinar

Você pode patrocinar o desenvolvimento contínuo do Baileys através de [purpshell.dev/sponsor](https://purpshell.dev/sponsor). purpshell é o mantenedor ativo atual. Tanto patrocínios únicos quanto recorrentes são suportados.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Split this CTA into shorter sentences for clarity.

This line packs multiple ideas in one sentence and is harder to scan.

✍️ Suggested rewrite
-Você pode patrocinar o desenvolvimento contínuo do Baileys através de [purpshell.dev/sponsor](https://purpshell.dev/sponsor). purpshell é o mantenedor ativo atual. Tanto patrocínios únicos quanto recorrentes são suportados.
+Você pode patrocinar o desenvolvimento contínuo do Baileys em [purpshell.dev/sponsor](https://purpshell.dev/sponsor).
+Atualmente, purpshell é o mantenedor ativo.
+Você pode enviar patrocínios únicos ou recorrentes.

As per coding guidelines, "Keep sentences concise with one idea per sentence in documentation".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Você pode patrocinar o desenvolvimento contínuo do Baileys através de [purpshell.dev/sponsor](https://purpshell.dev/sponsor). purpshell é o mantenedor ativo atual. Tanto patrocínios únicos quanto recorrentes são suportados.
Você pode patrocinar o desenvolvimento contínuo do Baileys em [purpshell.dev/sponsor](https://purpshell.dev/sponsor).
Atualmente, purpshell é o mantenedor ativo.
Você pode enviar patrocínios únicos ou recorrentes.
🧰 Tools
🪛 LanguageTool

[style] ~10-~10: Para conferir mais clareza ao seu texto, busque usar uma linguagem mais concisa.
Context: ...r o desenvolvimento contínuo do Baileys através de [purpshell.dev/sponsor](https://purpshe...

(ATRAVES_DE_POR_VIA)

🤖 Prompt for 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.

In `@pt-BR/community/sponsor.mdx` at line 10, Split the long CTA sentence into two
or three shorter sentences so each conveys one idea: 1) state that readers can
sponsor Baileys via the provided link, 2) note that purpshell.dev is the current
active maintainer, and 3) mention that both one-time and recurring sponsorships
are supported; update the sentence containing "Você pode patrocinar... purpshell
é o mantenedor ativo atual. Tanto patrocínios únicos..." accordingly to improve
clarity and scanability.

description: "Ajude a traduzir a documentação do Baileys para mais línguas."
---

Esta documentação é escrita em inglês. Queremos torná-la acessível ao maior número possível de pessoas desenvolvedoras crowdsourcing traduções.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix wording in the intro sentence (currently unnatural).

The phrase ending in “crowdsourcing traduções” reads broken in PT-BR and hurts comprehension.

✍️ Suggested rewrite
-Esta documentação é escrita em inglês. Queremos torná-la acessível ao maior número possível de pessoas desenvolvedoras crowdsourcing traduções.
+Esta documentação é escrita em inglês.
+Você pode ajudar a torná-la acessível para mais pessoas desenvolvedoras contribuindo com traduções.

As per coding guidelines, "Use active voice and second person ('you') in documentation writing".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Esta documentação é escrita em inglês. Queremos torná-la acessível ao maior número possível de pessoas desenvolvedoras crowdsourcing traduções.
Esta documentação é escrita em inglês.
Você pode ajudar a torná-la acessível para mais pessoas desenvolvedoras contribuindo com traduções.
🤖 Prompt for 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.

In `@pt-BR/community/translations.mdx` at line 6, Rewrite the intro sentence that
currently ends with “crowdsourcing traduções” to use active voice and second
person; replace the awkward phrase with a natural PT-BR alternative (e.g.,
change "Esta documentação é escrita em inglês. Queremos torná-la acessível ao
maior número possível de pessoas desenvolvedoras crowdsourcing traduções." to a
version using "você" and "traduções colaborativas" or similar) so the sentence
flows naturally and follows the guideline to use active voice/second person.

Comment thread pt-BR/concepts/events.mdx
Comment on lines +327 to +331
if (events['messages.update']) {
for (const { key, update } of events['messages.update']) {
if (update.pollUpdates) {
const pollCreation = await getMessage(key)
if (pollCreation) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

getMessage is used but never defined in the full example.

This snippet won’t run as written because getMessage is missing in scope.

🔧 Suggested minimal fix
 async function startSock() {
+  const messageStore = new Map<string, proto.IMessage>()
+
   const { state, saveCreds } = await useMultiFileAuthState('baileys_auth_info')
   const { version } = await fetchLatestBaileysVersion()
@@
     if (events['messages.update']) {
       for (const { key, update } of events['messages.update']) {
         if (update.pollUpdates) {
-          const pollCreation = await getMessage(key)
+          const msgId = `${key.remoteJid}:${key.id}`
+          const pollCreation = messageStore.get(msgId)
           if (pollCreation) {
             console.log(
               'Poll results:',
🤖 Prompt for 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.

In `@pt-BR/concepts/events.mdx` around lines 327 - 331, The example references
getMessage inside the events['messages.update'] handler but getMessage is not
defined in the example, causing the snippet to be non-runnable; add a minimal
implementation or import of getMessage (e.g., a helper function that accepts key
and returns the stored message or calls the SDK client) and ensure it is
declared/visible in the same scope as the event loop so the pollCreation
assignment (const pollCreation = await getMessage(key)) resolves correctly;
update the example to either define async function getMessage(key) { ... } or
replace the call with the appropriate client method used elsewhere in the
sample.

Comment on lines +15 to +24
import makeWASocket, { useMultiFileAuthState, makeCacheableSignalKeyStore } from '@whiskeysockets/baileys'
import P from 'pino'

const { state, saveCreds } = await useMultiFileAuthState('baileys_auth_info')

const sock = makeWASocket({
auth: {
creds: state.creds,
keys: makeCacheableSignalKeyStore(state.keys, logger),
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix undefined logger in the auth snippet.

makeCacheableSignalKeyStore(state.keys, logger) uses logger, but this variable is not declared in the snippet. This creates a broken copy/paste path for readers.

Proposed fix
 import makeWASocket, { useMultiFileAuthState, makeCacheableSignalKeyStore } from '@whiskeysockets/baileys'
 import P from 'pino'
 
 const { state, saveCreds } = await useMultiFileAuthState('baileys_auth_info')
+const logger = P({ level: 'silent' })
 
 const sock = makeWASocket({
   auth: {
     creds: state.creds,
     keys: makeCacheableSignalKeyStore(state.keys, logger),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import makeWASocket, { useMultiFileAuthState, makeCacheableSignalKeyStore } from '@whiskeysockets/baileys'
import P from 'pino'
const { state, saveCreds } = await useMultiFileAuthState('baileys_auth_info')
const sock = makeWASocket({
auth: {
creds: state.creds,
keys: makeCacheableSignalKeyStore(state.keys, logger),
},
import makeWASocket, { useMultiFileAuthState, makeCacheableSignalKeyStore } from '@whiskeysockets/baileys'
import P from 'pino'
const { state, saveCreds } = await useMultiFileAuthState('baileys_auth_info')
const logger = P({ level: 'silent' })
const sock = makeWASocket({
auth: {
creds: state.creds,
keys: makeCacheableSignalKeyStore(state.keys, logger),
},
🤖 Prompt for 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.

In `@pt-BR/concepts/socket-config.mdx` around lines 15 - 24, The snippet calls
makeCacheableSignalKeyStore(state.keys, logger) but logger is not defined;
declare a logger before use (e.g., create a Pino logger via the imported P from
'pino' and assign it to a const named logger) and then pass that logger into
makeCacheableSignalKeyStore so the auth block for makeWASocket has a defined
logger; locate this near the top where useMultiFileAuthState and makeWASocket
are used (symbols: makeCacheableSignalKeyStore, makeWASocket,
useMultiFileAuthState, state).


| Duração | Segundos |
| --- | --- |
| Off | `0` |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Localize “Off” in the duration table.

Use a Portuguese label (for example, “Desativado”) to keep terminology consistent across the pt-BR page.

🤖 Prompt for 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.

In `@pt-BR/features/privacy.mdx` at line 97, Replace the English label "Off" in
the duration table row that currently reads "| Off | `0` |" with a Portuguese
term such as "Desativado" to localize the pt-BR privacy page; update the table
entry text so it becomes "| Desativado | `0` |" ensuring consistency with other
pt-BR labels in the document.

Comment on lines +137 to +139
const ppUrl = await sock.profilePictureUrl(jid)
const ppUrl = await sock.profilePictureUrl(jid, 'image') // alta resolução
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify duplicate declaration occurrences in this doc snippet
rg -n -C1 "const ppUrl = await sock\.profilePictureUrl" pt-BR/messaging/chat-management.mdx

Repository: WhiskeySockets/docs

Length of output: 222


Fix duplicate const ppUrl declaration in the profile-picture snippet.

Lines 137-138 redeclare const ppUrl in the same scope, creating invalid TypeScript code that cannot be executed when copied as-is.

Suggested fix
-const ppUrl = await sock.profilePictureUrl(jid)
-const ppUrl = await sock.profilePictureUrl(jid, 'image') // alta resolução
+const ppUrl = await sock.profilePictureUrl(jid)
+const ppUrlHd = await sock.profilePictureUrl(jid, 'image') // alta resolução
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const ppUrl = await sock.profilePictureUrl(jid)
const ppUrl = await sock.profilePictureUrl(jid, 'image') // alta resolução
```
const ppUrl = await sock.profilePictureUrl(jid)
const ppUrlHd = await sock.profilePictureUrl(jid, 'image') // alta resolução
🤖 Prompt for 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.

In `@pt-BR/messaging/chat-management.mdx` around lines 137 - 139, There are two
duplicate declarations of const ppUrl in the profile-picture snippet causing a
TypeScript redeclaration error; keep a single declaration for ppUrl and call
sock.profilePictureUrl only once with the desired argument (e.g.,
sock.profilePictureUrl(jid, 'image') for high resolution) or rename the second
variable if you intend to preserve both values—update the code around the ppUrl
declarations (references to ppUrl and the sock.profilePictureUrl calls) so only
one const is declared in that scope.

Comment on lines +66 to +86
Converta com `ffmpeg` antes de enviar:

```bash
ffmpeg -i input.mp4 -avoid_negative_ts make_zero -ac 1 output.ogg
```

```typescript
await sock.sendMessage(
jid,
{
audio: {
url: './Media/audio.mp3'
},
mimetype: 'audio/mp4'
}
)
```

<Note>
Flags `ffmpeg`: `codec: libopus`, `ac: 1`, `avoid_negative_ts make_zero`.
</Note>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Audio example is internally inconsistent (format vs mimetype).

You convert to .ogg but then send audio.mp3 with mimetype: 'audio/mp4'. The command, filename, and mimetype should match.

🔧 Suggested fix
-ffmpeg -i input.mp4 -avoid_negative_ts make_zero -ac 1 output.ogg
+ffmpeg -i input.mp4 -c:a libopus -ac 1 -avoid_negative_ts make_zero output.ogg
 await sock.sendMessage(
     jid,
     {
         audio: {
-            url: './Media/audio.mp3'
+            url: './Media/audio.ogg'
         },
-        mimetype: 'audio/mp4'
+        mimetype: 'audio/ogg; codecs=opus'
     }
 )
-  Flags `ffmpeg`: `codec: libopus`, `ac: 1`, `avoid_negative_ts make_zero`.
+  Use `ffmpeg` with `-c:a libopus -ac 1 -avoid_negative_ts make_zero` to produce Opus audio in `.ogg`.
🤖 Prompt for 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.

In `@pt-BR/messaging/media-messages.mdx` around lines 66 - 86, The example is
inconsistent: the ffmpeg command produces output.ogg but the sendMessage uses
'./Media/audio.mp3' with mimetype 'audio/mp4'; update them to match: either
change the ffmpeg invocation to produce an MP3/MP4 file and keep
'./Media/audio.mp3' with mimetype 'audio/mp4' in the sendMessage call, or change
the sendMessage audio URL to './Media/output.ogg' and set mimetype to the
correct OGG/Opus value (e.g., 'audio/ogg; codecs=opus') and ensure the ffmpeg
flags (codec libopus, ac 1, avoid_negative_ts make_zero) are used consistently.

## Deletar mensagem para todos

```typescript
const msg = await sock.sendMessage(jid, { text: 'hello word' })
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix typo in example text.

The example uses 'hello word' but should use 'hello world' (the conventional example text).

📝 Proposed fix
-const msg = await sock.sendMessage(jid, { text: 'hello word' })
+const msg = await sock.sendMessage(jid, { text: 'hello world' })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const msg = await sock.sendMessage(jid, { text: 'hello word' })
const msg = await sock.sendMessage(jid, { text: 'hello world' })
🤖 Prompt for 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.

In `@pt-BR/messaging/message-actions.mdx` at line 9, The example contains a typo
in the message text: change the string passed to sock.sendMessage in the const
msg = await sock.sendMessage(jid, { text: 'hello word' }) example to the
conventional 'hello world' so the sample output is correct and idiomatic.

Comment on lines +21 to +27
await sock.sendMessage(jid, { text: 'hello word' })
```

### Citação / resposta

```typescript
await sock.sendMessage(jid, { text: 'hello word' }, { quoted: message })
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix typo in sample text (wordworld).

Small typo in both text message examples.

Proposed fix
-await sock.sendMessage(jid, { text: 'hello word' })
+await sock.sendMessage(jid, { text: 'hello world' })
...
-await sock.sendMessage(jid, { text: 'hello word' }, { quoted: message })
+await sock.sendMessage(jid, { text: 'hello world' }, { quoted: message })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
await sock.sendMessage(jid, { text: 'hello word' })
```
### Citação / resposta
```typescript
await sock.sendMessage(jid, { text: 'hello word' }, { quoted: message })
await sock.sendMessage(jid, { text: 'hello world' })
🤖 Prompt for 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.

In `@pt-BR/messaging/sending-messages.mdx` around lines 21 - 27, Update the sample
messages to fix the typo: change the text payload in both sendMessage examples
from 'hello word' to 'hello world' (the two occurrences using await
sock.sendMessage(jid, { text: 'hello word' }) and await sock.sendMessage(jid, {
text: 'hello word' }, { quoted: message })). Ensure both string literals are
corrected.

Comment on lines +73 to +75
await sock.sendMessage(
id,
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use jid consistently in the contact example.

This snippet sends with id, but the page consistently uses jid. As written, readers will hit an undefined variable in copy/paste usage.

Proposed fix
 await sock.sendMessage(
-    id,
+    jid,
     {
         contacts: {
             displayName: 'Jeff',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
await sock.sendMessage(
id,
{
await sock.sendMessage(
jid,
{
contacts: {
displayName: 'Jeff',
🤖 Prompt for 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.

In `@pt-BR/messaging/sending-messages.mdx` around lines 73 - 75, The sendMessage
call uses an undefined variable id instead of the page's consistent jid; update
the call to use jid (i.e., pass jid as the recipient) in the sock.sendMessage
invocation and ensure any examples or surrounding text reference jid
consistently (look for the sock.sendMessage call and the variable named jid in
the example).

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

19 issues found across 35 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="pt-BR/advanced/troubleshooting.mdx">

<violation number="1" location="pt-BR/advanced/troubleshooting.mdx:85">
P1: The `messages.update` callback uses `await` but is not marked `async`, which makes the sample invalid.</violation>

<violation number="2" location="pt-BR/advanced/troubleshooting.mdx:114">
P2: The MIME type does not match the converted `.ogg` file; use an OGG/Opus MIME type.</violation>

<violation number="3" location="pt-BR/advanced/troubleshooting.mdx:189">
P2: Use `continue` instead of `return` so one empty message does not stop processing the rest of the batch.</violation>
</file>

<file name="pt-BR/messaging/sending-messages.mdx">

<violation number="1" location="pt-BR/messaging/sending-messages.mdx:74">
P2: The contact example passes `id` to `sendMessage`, but this page documents and uses `jid` as the chat identifier. Using `id` here will break when copied as-is.</violation>
</file>

<file name="pt-BR/concepts/data-store.mdx">

<violation number="1" location="pt-BR/concepts/data-store.mdx:152">
P1: Guard `msg.message` before inserting into SQLite. Without this, some `messages.upsert` events can trigger invalid writes against the `data TEXT NOT NULL` column.</violation>
</file>

<file name="pt-BR/concepts/socket-config.mdx">

<violation number="1" location="pt-BR/concepts/socket-config.mdx:23">
P2: The example uses `logger` without defining it, so the snippet does not run as written.</violation>
</file>

<file name="pt-BR/quickstart.mdx">

<violation number="1" location="pt-BR/quickstart.mdx:50">
P2: Filter `messages.upsert` replies to new inbound messages (`type === 'notify'` and `!m.key.fromMe`) to avoid self-reply loops and duplicate auto-responses.</violation>
</file>

<file name="pt-BR/migration/v7.mdx">

<violation number="1" location="pt-BR/migration/v7.mdx:17">
P2: This line contradicts itself: it says LID → PN is not possible, but the same sentence lists `getPNForLID` (the inverse lookup). Clarify the limitation so the migration guidance is consistent.</violation>
</file>

<file name="pt-BR/authentication/session-management.mdx">

<violation number="1" location="pt-BR/authentication/session-management.mdx:123">
P2: The `BufferJSON` snippet redeclares `creds` and references it before initialization, so the example is invalid when executed.</violation>
</file>

<file name="pt-BR/features/presence.mdx">

<violation number="1" location="pt-BR/features/presence.mdx:21">
P2: The "Padrão completo" snippet uses `sock` before it is initialized, so the example is not executable as documented.</violation>
</file>

<file name="pt-BR/messaging/chat-management.mdx">

<violation number="1" location="pt-BR/messaging/chat-management.mdx:138">
P2: The example redeclares `ppUrl` with `const` in the same scope, which makes the snippet invalid when copied.</violation>
</file>

<file name="pt-BR/community/translations.mdx">

<violation number="1" location="pt-BR/community/translations.mdx:6">
P3: Fix the broken sentence so the translation request is clear and grammatically correct in Portuguese.</violation>
</file>

<file name="pt-BR/messaging/message-actions.mdx">

<violation number="1" location="pt-BR/messaging/message-actions.mdx:22">
P2: The edit example references `response.key`, but `response` is never defined in the snippet. Use a defined message key variable before calling `edit`.</violation>
</file>

<file name="concepts/socket-config.mdx">

<violation number="1" location="concepts/socket-config.mdx:71">
P3: This wording contradicts the documented default for `syncFullHistory` and may mislead readers. Clarify that `syncFullHistory` is already `true` by default, and that using a desktop browser preset is the key step for extended history.</violation>
</file>

<file name="concepts/jids.mdx">

<violation number="1" location="concepts/jids.mdx:232">
P2: Clarify that `META_AI_JID` (`@c.us`) does not match `isJidMetaAI` (`@bot`) to avoid a misleading detection example.</violation>
</file>

<file name="pt-BR/concepts/events.mdx">

<violation number="1" location="pt-BR/concepts/events.mdx:156">
P2: The complete example uses `getMessage(key)` without defining it, so the snippet is not runnable as written.</violation>
</file>

<file name="pt-BR/messaging/media-messages.mdx">

<violation number="1" location="pt-BR/messaging/media-messages.mdx:24">
P2: This snippet sends to `id`, but the page consistently uses `jid`. As written, readers will hit an undefined-variable error when copying this example. Change `id` to `jid`.</violation>

<violation number="2" location="pt-BR/messaging/media-messages.mdx:69">
P2: O comando `ffmpeg` omite `-c:a libopus`, apesar de a própria seção exigir codec Opus. Isso deixa a instrução inconsistente e pode gerar áudio incompatível.</violation>

<violation number="3" location="pt-BR/messaging/media-messages.mdx:77">
P2: O exemplo de envio de áudio usa arquivo `.mp3` com `mimetype: 'audio/mp4'`, o que é inconsistente com o próprio passo de conversão para `.ogg` e pode quebrar reprodução em alguns clientes.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

```typescript
import { getAggregateVotesInPollMessage } from '@whiskeysockets/baileys'

sock.ev.on('messages.update', event => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The messages.update callback uses await but is not marked async, which makes the sample invalid.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/advanced/troubleshooting.mdx, line 85:

<comment>The `messages.update` callback uses `await` but is not marked `async`, which makes the sample invalid.</comment>

<file context>
@@ -0,0 +1,229 @@
+    ```typescript
+    import { getAggregateVotesInPollMessage } from '@whiskeysockets/baileys'
+
+    sock.ev.on('messages.update', event => {
+        for(const { key, update } of event) {
+            if(update.pollUpdates) {
</file context>
Suggested change
sock.ev.on('messages.update', event => {
sock.ev.on('messages.update', async event => {


export async function saveMessage(msg: proto.IWebMessageInfo) {
if (msg.key.remoteJid && msg.key.id) {
insertMsg.run(msg.key.remoteJid, msg.key.id, JSON.stringify(msg.message))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Guard msg.message before inserting into SQLite. Without this, some messages.upsert events can trigger invalid writes against the data TEXT NOT NULL column.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/concepts/data-store.mdx, line 152:

<comment>Guard `msg.message` before inserting into SQLite. Without this, some `messages.upsert` events can trigger invalid writes against the `data TEXT NOT NULL` column.</comment>

<file context>
@@ -0,0 +1,240 @@
+
+export async function saveMessage(msg: proto.IWebMessageInfo) {
+  if (msg.key.remoteJid && msg.key.id) {
+    insertMsg.run(msg.key.remoteJid, msg.key.id, JSON.stringify(msg.message))
+  }
+}
</file context>


sock.ev.on('messages.upsert', async ({ messages }) => {
for (const m of messages) {
if (!m.message) return
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Use continue instead of return so one empty message does not stop processing the rest of the batch.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/advanced/troubleshooting.mdx, line 189:

<comment>Use `continue` instead of `return` so one empty message does not stop processing the rest of the batch.</comment>

<file context>
@@ -0,0 +1,229 @@
+
+    sock.ev.on('messages.upsert', async ({ messages }) => {
+        for (const m of messages) {
+            if (!m.message) return
+            const messageType = getContentType(m.message)
+
</file context>
Suggested change
if (!m.message) return
if (!m.message) continue

```typescript
await sock.sendMessage(jid, {
audio: { url: './output.ogg' },
mimetype: 'audio/mp4'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The MIME type does not match the converted .ogg file; use an OGG/Opus MIME type.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/advanced/troubleshooting.mdx, line 114:

<comment>The MIME type does not match the converted `.ogg` file; use an OGG/Opus MIME type.</comment>

<file context>
@@ -0,0 +1,229 @@
+    ```typescript
+    await sock.sendMessage(jid, {
+        audio: { url: './output.ogg' },
+        mimetype: 'audio/mp4'
+    })
+    ```
</file context>

+ 'END:VCARD'

await sock.sendMessage(
id,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The contact example passes id to sendMessage, but this page documents and uses jid as the chat identifier. Using id here will break when copied as-is.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/messaging/sending-messages.mdx, line 74:

<comment>The contact example passes `id` to `sendMessage`, but this page documents and uses `jid` as the chat identifier. Using `id` here will break when copied as-is.</comment>

<file context>
@@ -0,0 +1,185 @@
+            + 'END:VCARD'
+
+await sock.sendMessage(
+    id,
+    {
+        contacts: {
</file context>

Converta com `ffmpeg` antes de enviar:

```bash
ffmpeg -i input.mp4 -avoid_negative_ts make_zero -ac 1 output.ogg
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: O comando ffmpeg omite -c:a libopus, apesar de a própria seção exigir codec Opus. Isso deixa a instrução inconsistente e pode gerar áudio incompatível.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/messaging/media-messages.mdx, line 69:

<comment>O comando `ffmpeg` omite `-c:a libopus`, apesar de a própria seção exigir codec Opus. Isso deixa a instrução inconsistente e pode gerar áudio incompatível.</comment>

<file context>
@@ -0,0 +1,146 @@
+Converta com `ffmpeg` antes de enviar:
+
+```bash
+ffmpeg -i input.mp4 -avoid_negative_ts make_zero -ac 1 output.ogg
+```
+
</file context>
Suggested change
ffmpeg -i input.mp4 -avoid_negative_ts make_zero -ac 1 output.ogg
ffmpeg -i input.mp4 -c:a libopus -avoid_negative_ts make_zero -ac 1 output.ogg

jid,
{
audio: {
url: './Media/audio.mp3'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: O exemplo de envio de áudio usa arquivo .mp3 com mimetype: 'audio/mp4', o que é inconsistente com o próprio passo de conversão para .ogg e pode quebrar reprodução em alguns clientes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/messaging/media-messages.mdx, line 77:

<comment>O exemplo de envio de áudio usa arquivo `.mp3` com `mimetype: 'audio/mp4'`, o que é inconsistente com o próprio passo de conversão para `.ogg` e pode quebrar reprodução em alguns clientes.</comment>

<file context>
@@ -0,0 +1,146 @@
+    jid,
+    {
+        audio: {
+            url: './Media/audio.mp3'
+        },
+        mimetype: 'audio/mp4'
</file context>


```typescript
await sock.sendMessage(
id,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This snippet sends to id, but the page consistently uses jid. As written, readers will hit an undefined-variable error when copying this example. Change id to jid.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/messaging/media-messages.mdx, line 24:

<comment>This snippet sends to `id`, but the page consistently uses `jid`. As written, readers will hit an undefined-variable error when copying this example. Change `id` to `jid`.</comment>

<file context>
@@ -0,0 +1,146 @@
+
+```typescript
+await sock.sendMessage(
+    id,
+    {
+        image: {
</file context>
Suggested change
id,
jid,

description: "Ajude a traduzir a documentação do Baileys para mais línguas."
---

Esta documentação é escrita em inglês. Queremos torná-la acessível ao maior número possível de pessoas desenvolvedoras crowdsourcing traduções.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Fix the broken sentence so the translation request is clear and grammatically correct in Portuguese.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pt-BR/community/translations.mdx, line 6:

<comment>Fix the broken sentence so the translation request is clear and grammatically correct in Portuguese.</comment>

<file context>
@@ -0,0 +1,24 @@
+description: "Ajude a traduzir a documentação do Baileys para mais línguas."
+---
+
+Esta documentação é escrita em inglês. Queremos torná-la acessível ao maior número possível de pessoas desenvolvedoras crowdsourcing traduções.
+
+## Idiomas que estamos priorizando
</file context>


### Receiving full message history

By default, Baileys connects with a Chrome browser profile, which limits how much history WhatsApp delivers on the initial sync. To request the full history, set `syncFullHistory: true` and use the `Browsers.macOS('Desktop')` preset, which WhatsApp treats as a desktop client eligible for extended history.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This wording contradicts the documented default for syncFullHistory and may mislead readers. Clarify that syncFullHistory is already true by default, and that using a desktop browser preset is the key step for extended history.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At concepts/socket-config.mdx, line 71:

<comment>This wording contradicts the documented default for `syncFullHistory` and may mislead readers. Clarify that `syncFullHistory` is already `true` by default, and that using a desktop browser preset is the key step for extended history.</comment>

<file context>
@@ -56,7 +56,35 @@ const sock = makeWASocket({
+
+### Receiving full message history
+
+By default, Baileys connects with a Chrome browser profile, which limits how much history WhatsApp delivers on the initial sync. To request the full history, set `syncFullHistory: true` and use the `Browsers.macOS('Desktop')` preset, which WhatsApp treats as a desktop client eligible for extended history.
+
+```typescript
</file context>
Suggested change
By default, Baileys connects with a Chrome browser profile, which limits how much history WhatsApp delivers on the initial sync. To request the full history, set `syncFullHistory: true` and use the `Browsers.macOS('Desktop')` preset, which WhatsApp treats as a desktop client eligible for extended history.
By default, Baileys connects with a Chrome browser profile, which limits how much history WhatsApp delivers on the initial sync. `syncFullHistory` is `true` by default, but to receive extended history you should use the `Browsers.macOS('Desktop')` preset, which WhatsApp treats as a desktop client.

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.

1 participant