OptionalrouterThe underlying makeWASocket() return value (null before start()).
Register a !command handler (exact match or prefix + whitespace).
Create a CommandRouter, wire it into the chain, and return it.
Optionalopts: CommandRouterOptionsDrain queued messages after reconnect.
Register a handler that fires on any non-empty text.
Reject and clear the message queue.
Send a message — queues automatically when disconnected.
Optionaloptions: Record<string, unknown>Start the socket and wire all event handlers.
Gracefully stop the bot (cancels reconnect, rejects queue, closes stores).
Register a middleware function (Express/Koa-style use()/next()).
Attach an already-built CommandRouter to the middleware chain.
The CommandRouter attached via createRouter()/useRouter(), if any.