Skip to content

Logger, replies and other bunch of things

Choose a tag to compare

@Secreto31126 Secreto31126 released this 10 Jul 05:12
· 1431 commits to main since this release
d48e52a

What's Changed

Logger

Easily log every call to sendMessage with the sent object by the bot. Useful for keeping track and debuging conversations between the bot and the client.

new WhatsAppAPI("TOKEN").logSentMessages((from, to) => console.log(`Sent message from phoneID ${from} to user ${to}`));

Reply

This option poped-up in the documentation, and even though the implementation from my code should be correct, it doesn't work. I tested it with the simplests commands and nothing. Maybe it's still not available 🤷‍♂️. Anyway, the code is there for when they decide to enable it.

Whatsapp.sendMessage(from, to, new Text("Hello World!"), "the-message-id-you-want-to-reply-to")

Version bump

Now the default version of the API is v14.0 . This is the only breaking change from the previous version.

Git

Minor changes to the repository. Better CI-CD, a new (and faster) documentation website, and last, but not least, there are unit tests for less than half of the code. I will consider increasing the coverage, sooner or later.

Full Changelog: v0.4.2...0.5.0