lidformatter
v1.0.2
Published
Helper to format and convert WhatsApp LID to JID for Baileys library
Downloads
212
Maintainers
Readme
What's New
adding a mapping mention user
Installing Modules
npm i lidformatterHow to work
import { formatMessageWithJid } from "lidformatter";
bot.ev.on("messages.upsert", async (msg) => {
const msget = msg.messages[0];
if (!msget.message) return;
// Process message parsing and convert LID metadata into native standard JIDs
const m = await formatMessageWithJid(bot, msget);
console.log("Sender JID:", m.jidUser); // Output: [email protected]
console.log("Mentioned JIDs:", m.mentions); // Output: ['[email protected]']
});
[!IMPORTANT] WhatsApp may update LID structures at any time. Please refer to the official Baileys documentation for further updates. WhatsApp may update LID structures at any time. Please refer to the official Baileys documentation for further updates. Read the docs
