@botmesh/core) is a rewrite of v1, which was published as
@bot-wa/bot-wa-baileys (BaileysClass). The engine is new and transport
agnostic: everything about the WhatsApp connection (session, QR, JIDs, auth)
moved into a provider you build and pass to the bot. This page summarizes
what changes; the step-by-step guide with before/after examples is
MIGRATION-v1-to-v2 (in Spanish).
What maps to what
Behaviour that changes
- Text triggers match by normalized equality, not “contains”. Ask for
{ pattern, match: 'contains' }where you relied on it (Core concepts). - Type handlers (
onType,bot.when(IMAGE, …)) are low specificity: a more specific handler that matches wins unless it callsctx.pass(). - The
'message'event fires for every processed message; the catch-all for unhandled messages isbot.onMessage(). - Group conversations are per participant by default
(
conversationScope: 'chat'restores one per chat). - ESM only, Node.js 22 or newer (see Packages and versions).
.persistent()flows survive a restart only with a persistent store (Persistent store).
Tools that help
- The ESLint rule
botmesh/no-v1-apiflags the v1 and BuilderBot calls that no longer exist and names the replacement. - Channels lists every provider that replaces the built-in WhatsApp connection.
Next steps
- Quick start: a v2 project from scratch.
- Conversation flows: the
flow()DSL in detail. - Upgrade guide: moving between 2.0 prereleases.