Skip to main content
botmesh 2 (@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 calls ctx.pass().
  • The 'message' event fires for every processed message; the catch-all for unhandled messages is bot.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-api flags 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