Skip to content
MessageBuilder
Documentation menu
POST_TYPE

POST_TYPE

3 values

POST_TYPE enum reference: 3 values, including raw values and string names.

API reference
v4.8/Baileys runtime
On this page

On this page

All enumsEnums.POST_TYPE

This enum has 3 values. Value 0 is alwaysUNSET_OR_UNRECOGNIZED_ENUM_VALUE and acts as the fallback for unknown input.

ValueName
0UNSET_OR_UNRECOGNIZED_ENUM_VALUEfallback
1GROUP_POST
2PAGE_POST

Usage

POST_TYPE.js
javascript
import { Enums } from './lib/MessageBuilderEnums.js';

// Raw value
const raw = Enums.POST_TYPE.GROUP_POST; // 1

// Name from a value
const name = Enums.POST_TYPE.get(1); // "GROUP_POST"

// Pass-through from a string
const passthrough = Enums.POST_TYPE.get('GROUP_POST'); // "GROUP_POST"

.get() returns a string for numeric input and passes a string through unchanged. Unknown values resolve to UNSET_OR_UNRECOGNIZED_ENUM_VALUE.

Notes

Where is it used?

Some enums are consumed directly by builder methods such as addImage() andaddVideo(). Others are available for custom payloads through addWidget() oraddPayload().

Not an official contract

Names and values come from the internal WhatsApp schema. Changes on WhatsApp’s side can make these values irrelevant.