New Message Types
UDMODZ Edition supports a set of premium, high-impact message structures. All of these types are integrated directly into the standard sock.sendMessage(jid, content) API.
🤖 Meta AI Icon
Add the native cyan Meta AI ✦ icon to any text message.
await sock.sendMessage(jid, {
text: "Hello! I am your AI assistant.",
ai: true
})
💬 AI Disclaimer
Add a small, subtle AI disclaimer banner underneath the message text.
await sock.sendMessage(jid, {
text: "Here is your translated document.",
aiDisclaimer: "Generated using deep learning translation models."
})
💻 Code Block (Rich Response)
Render a syntax-highlighted code block with a language indicator, formatted in WhatsApp's premium AI style.
await sock.sendMessage(jid, {
contentText: "Check out this TypeScript example:",
code: `const sum = (a: number, b: number): number => {\n return a + b;\n};`,
language: "typescript" // optional: javascript, python, bash, go, etc.
})
📊 Table (Rich Response)
Render a structured, formatted data table. The first row is treated as the column headers automatically.
await sock.sendMessage(jid, {
contentText: "Monthly server metrics:",
title: "Server Performance",
table: [
["Server", "Uptime", "Load"],
["Node-01", "99.99%", "0.42"],
["Node-02", "99.95%", "0.85"],
["Db-Repl", "100.0%", "0.15"]
]
// noHeading: true // Set to true to treat the first row as normal data
})
🎞️ Album Message
Send multiple images or videos grouped together as a WhatsApp media album.
await sock.sendMessage(jid, {
album: [
{ image: { url: 'https://example.com/cover.jpg' }, caption: 'Cover photo' },
{ image: { url: 'https://example.com/banner.jpg' }, caption: 'Banner image' },
{ video: { url: 'https://example.com/trailer.mp4' }, caption: 'Launch trailer' }
]
})
🗓️ Event Card
Send native, interactive WhatsApp event invitation cards.
await sock.sendMessage(jid, {
event: {
name: "Hackathon Kickoff 🚀",
description: "Introductory session, team matching, and challenge reveal.",
location: "Discord Developer Lounge",
startDate: new Date(Date.now() + 24 * 3600 * 1000), // tomorrow
endDate: new Date(Date.now() + 26 * 3600 * 1000) // 2 hours duration
}
})
📹 PTV (Round Video Note)
Send circular, auto-playing video note bubbles (similar to video notes in Telegram or WhatsApp's push-to-video notes).
await sock.sendMessage(jid, {
video: { url: 'https://example.com/reaction.mp4' },
ptv: true
})
📣 Mention All Group Members
Tag all participants in a group chat automatically without fetching group metadata or manually listing every JID.
await sock.sendMessage(jid, {
text: "Important announcement! 📢 Please read.",
mentionAll: true
})
🧾 Rich Response (Mixed Custom Layout)
Compose custom layouts mixing free text, tables, and code blocks inside a single message payload.
await sock.sendMessage(jid, {
richResponse: [
{ text: "Here is the summary of packages:" },
{
table: [
{ isHeader: true, items: ["Package", "Version", "Status"] },
{ isHeader: false, items: ["amiudmodz", "1.0.0", "Installed"] },
{ isHeader: false, items: ["typescript", "5.4.2", "Up-to-date"] }
],
title: "Dependency Status"
},
{
code: [
{ highlightType: 1, codeContent: "npm" },
{ highlightType: 0, codeContent: " run dev" }
],
language: "bash"
}
]
})