Venom is a TypeScript library for building automated bots that interact with WhatsApp. It provides a complete toolkit for programmatically managing chats, groups, and messages by bridging into the WhatsApp Web protocol through WebSocket communication. The library handles authentication via QR code scanning, session persistence to avoid repeated logins, and real-time event listening for message delivery, edits, deletions, and connection state changes.
The library offers a command-based routing system that directs incoming messages to handler functions based on pattern matching, alongside an event-driven pipeline for processing messages through middleware. It includes group state management for tracking membership and roles, multi-format media encoding for sending images, videos, documents, and audio, and a polling-free connection monitor that uses WebSocket keep-alives. Session credentials can be saved and restored from local storage to maintain persistent connections.
Venom supports sending and receiving text, media, and interactive messages such as polls, list menus, and buttons. It provides tools for managing group settings including creation, participant control, and admin roles, as well as chat organization features like pinning, archiving, muting, and deleting conversations. The library also includes device management capabilities for monitoring connection state, battery level, and app version, along with profile management for updating status, display name, and profile picture.