Class: Message
Represents a single chat message from the V1 API format. Used internally when parsing last-message info from the chat list.
Source: src/Types/Message.js
V1 vs V2 Messages
This class represents the V1 message format (from chat list data).
The V2 API (
bot.fetchMessages()) returns raw objects with a different structure
— use MediaInfo and Bot.isMediaMessage()
for V2 message handling.
Constructor
new Message(msguid, msg)
- msguid
string— Unique message ID.- msg
string— Message content text.
Properties
| Property | Type | Description |
|---|---|---|
msguid | string | Unique message identifier |
msg | string | Message text content |
const { Message } = require('arattix');
const msg = new Message('uid_12345', 'Hello world!');
console.log(msg.msguid); // "uid_12345"
console.log(msg.msg); // "Hello world!"