zaileys 0.28.92-dev → 0.28.93-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +77 -8
- package/dist/Modules/Action.d.ts +14 -0
- package/dist/Modules/Action.js +16 -0
- package/dist/Modules/Client.d.ts +36 -0
- package/dist/Modules/Client.js +274 -0
- package/dist/Modules/Config.d.ts +72 -0
- package/dist/Modules/Config.js +75 -0
- package/dist/Modules/Utils.d.ts +2 -0
- package/dist/Modules/Utils.js +26 -0
- package/dist/Parser/Message.d.ts +18 -0
- package/dist/Parser/Message.js +127 -0
- package/dist/Types/Action.d.ts +9 -0
- package/dist/Types/Action.js +2 -0
- package/dist/Types/General.d.ts +38 -0
- package/dist/Types/General.js +2 -0
- package/dist/Types/Message.d.ts +44 -0
- package/dist/Types/Message.js +2 -0
- package/dist/index.d.ts +3 -183
- package/dist/index.js +6 -102
- package/package.json +52 -41
- package/demo/ai/tools.js +0 -28
- package/demo/ai/you.js +0 -30
- package/demo/index.js +0 -26
- package/demo/package.json +0 -16
- package/demo/pnpm-lock.yaml +0 -1222
- package/demo/screenshot.png +0 -0
- package/dist/index.d.mts +0 -183
- package/dist/index.mjs +0 -102
- package/docs.css +0 -10
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageParser = void 0;
|
|
4
|
+
const baileys_1 = require("@whiskeysockets/baileys");
|
|
5
|
+
const Config_1 = require("../Modules/Config");
|
|
6
|
+
const Utils_1 = require("../Modules/Utils");
|
|
7
|
+
class MessageParser {
|
|
8
|
+
constructor({ socket, message, config, store }) {
|
|
9
|
+
this.socket = socket;
|
|
10
|
+
this.message = message;
|
|
11
|
+
this.config = config;
|
|
12
|
+
this.store = store;
|
|
13
|
+
}
|
|
14
|
+
async handle(payload) {
|
|
15
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
16
|
+
console.log(JSON.stringify(this.message, null, 2));
|
|
17
|
+
const data = (0, Utils_1.removeKeys)(payload || this.message, ["senderKeyDistributionMessage", "messageContextInfo"]);
|
|
18
|
+
if ((data === null || data === void 0 ? void 0 : data.messageStubType) || !Object.keys(data === null || data === void 0 ? void 0 : data.message).length)
|
|
19
|
+
return;
|
|
20
|
+
const messageData = data.ephemeralMessage || data;
|
|
21
|
+
const isExtended = !!((_a = messageData.message) === null || _a === void 0 ? void 0 : _a.extendedTextMessage);
|
|
22
|
+
const isEdited = !!((_c = (_b = messageData.message) === null || _b === void 0 ? void 0 : _b.protocolMessage) === null || _c === void 0 ? void 0 : _c.editedMessage);
|
|
23
|
+
const isBotInvoked = !!((_d = messageData.message) === null || _d === void 0 ? void 0 : _d.botInvokeMessage);
|
|
24
|
+
const chatEdited = ((_g = (_f = (_e = messageData.message) === null || _e === void 0 ? void 0 : _e.protocolMessage) === null || _f === void 0 ? void 0 : _f.editedMessage) === null || _g === void 0 ? void 0 : _g.extendedTextMessage) || ((_j = (_h = messageData.message) === null || _h === void 0 ? void 0 : _h.protocolMessage) === null || _j === void 0 ? void 0 : _j.editedMessage);
|
|
25
|
+
const originalType = isExtended
|
|
26
|
+
? Object.keys(messageData.message.extendedTextMessage)[0]
|
|
27
|
+
: isEdited
|
|
28
|
+
? Object.keys(chatEdited)[0]
|
|
29
|
+
: isBotInvoked
|
|
30
|
+
? Object.keys(messageData.message.botInvokeMessage.message.extendedTextMessage)[0]
|
|
31
|
+
: Object.keys(messageData.message)[0];
|
|
32
|
+
const chatRepliedId = isExtended ? (_m = (_l = (_k = messageData.message) === null || _k === void 0 ? void 0 : _k.extendedTextMessage) === null || _l === void 0 ? void 0 : _l.contextInfo) === null || _m === void 0 ? void 0 : _m.stanzaId : (_q = (_p = (_o = messageData.message) === null || _o === void 0 ? void 0 : _o[originalType]) === null || _p === void 0 ? void 0 : _p.contextInfo) === null || _q === void 0 ? void 0 : _q.stanzaId;
|
|
33
|
+
let chatType = Config_1.MESSAGE_TYPE[originalType];
|
|
34
|
+
if ((_s = (_r = messageData.message) === null || _r === void 0 ? void 0 : _r.protocolMessage) === null || _s === void 0 ? void 0 : _s.ephemeralExpiration)
|
|
35
|
+
chatType = "ephemeral";
|
|
36
|
+
const extract = isExtended
|
|
37
|
+
? messageData.message.extendedTextMessage[originalType]
|
|
38
|
+
: isEdited
|
|
39
|
+
? chatEdited[originalType]
|
|
40
|
+
: isBotInvoked
|
|
41
|
+
? messageData.message.botInvokeMessage.message.extendedTextMessage[originalType]
|
|
42
|
+
: messageData.message[originalType];
|
|
43
|
+
const text = typeof extract === "string" ? extract : (extract === null || extract === void 0 ? void 0 : extract.caption) || (extract === null || extract === void 0 ? void 0 : extract.text) || (extract === null || extract === void 0 ? void 0 : extract.name) || null;
|
|
44
|
+
const mentions = (text === null || text === void 0 ? void 0 : text.match(/@\d+/g)) || null;
|
|
45
|
+
const structure = {
|
|
46
|
+
fromMe: messageData.key.fromMe,
|
|
47
|
+
chatId: messageData.key.id,
|
|
48
|
+
roomId: messageData.key.remoteJid,
|
|
49
|
+
roomImage: async () => (await this.socket.profilePictureUrl(messageData.key.remoteJid, "image").catch(() => null)),
|
|
50
|
+
senderId: messageData.participant || messageData.key.participant || messageData.key.remoteJid,
|
|
51
|
+
senderName: messageData.pushName || messageData.verifiedBizName || null,
|
|
52
|
+
senderDevice: (0, baileys_1.getDevice)(messageData.key.id),
|
|
53
|
+
senderBio: async () => await this.socket
|
|
54
|
+
.fetchStatus(messageData.key.participant || messageData.key.remoteJid)
|
|
55
|
+
.then((x) => { var _a, _b; return (_b = (_a = x === null || x === void 0 ? void 0 : x[0]) === null || _a === void 0 ? void 0 : _a.status) === null || _b === void 0 ? void 0 : _b.status; })
|
|
56
|
+
.catch(() => null),
|
|
57
|
+
senderImage: async () => {
|
|
58
|
+
const result = await this.socket.profilePictureUrl(messageData.key.participant || messageData.key.remoteJid, "image").catch(() => null);
|
|
59
|
+
return result === undefined ? null : result;
|
|
60
|
+
},
|
|
61
|
+
senderBusiness: async () => (await this.socket.getBusinessProfile(messageData.key.participant || messageData.key.remoteJid).catch(() => null)),
|
|
62
|
+
chatType,
|
|
63
|
+
timestamp: Number((messageData.messageTimestamp.low || messageData.messageTimestamp || 0).toString()),
|
|
64
|
+
text,
|
|
65
|
+
command: (text === null || text === void 0 ? void 0 : text.startsWith(this.config.prefix)) ? (_t = text.split(" ")[0]) === null || _t === void 0 ? void 0 : _t.slice(1) : null,
|
|
66
|
+
mentions,
|
|
67
|
+
isGroup: messageData.key.remoteJid.endsWith("@g.us"),
|
|
68
|
+
isStory: messageData.key.remoteJid.endsWith("@broadcast"),
|
|
69
|
+
isEdited,
|
|
70
|
+
isChannel: messageData.key.remoteJid.endsWith("@newsletter"),
|
|
71
|
+
isBroadcast: !!messageData.broadcast,
|
|
72
|
+
isEphemeral: chatType === "ephemeral" || !!((_w = (_v = (_u = messageData.message) === null || _u === void 0 ? void 0 : _u.extendedTextMessage) === null || _v === void 0 ? void 0 : _v.contextInfo) === null || _w === void 0 ? void 0 : _w.expiration),
|
|
73
|
+
isForwarded: !!((_z = (_y = (_x = messageData.message) === null || _x === void 0 ? void 0 : _x.extendedTextMessage) === null || _y === void 0 ? void 0 : _y.contextInfo) === null || _z === void 0 ? void 0 : _z.isForwarded),
|
|
74
|
+
citation: {},
|
|
75
|
+
media: typeof extract !== "string" ? extract : null,
|
|
76
|
+
reply: null,
|
|
77
|
+
key: () => messageData.key,
|
|
78
|
+
message: () => this.message,
|
|
79
|
+
};
|
|
80
|
+
if (structure.media) {
|
|
81
|
+
structure.media = {
|
|
82
|
+
...structure.media,
|
|
83
|
+
...((structure.media.url || ((_1 = (_0 = messageData.message) === null || _0 === void 0 ? void 0 : _0.extendedTextMessage) === null || _1 === void 0 ? void 0 : _1.jpegThumbnail) || ((_2 = messageData.message) === null || _2 === void 0 ? void 0 : _2.newsletterAdminInviteMessage) || ((_3 = messageData.message) === null || _3 === void 0 ? void 0 : _3.orderMessage)) && {
|
|
84
|
+
buffer: async () => await (0, baileys_1.downloadMediaMessage)(this.message, "buffer", {}).catch(() => null),
|
|
85
|
+
stream: async () => await (0, baileys_1.downloadMediaMessage)(this.message, "stream", {}).catch(() => null),
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
88
|
+
structure.media =
|
|
89
|
+
(0, Utils_1.removeKeys)(structure.media, [
|
|
90
|
+
"url",
|
|
91
|
+
"contextInfo",
|
|
92
|
+
"fileSha256",
|
|
93
|
+
"fileEncSha256",
|
|
94
|
+
"mediaKey",
|
|
95
|
+
"directPath",
|
|
96
|
+
"waveform",
|
|
97
|
+
"thumbnail",
|
|
98
|
+
"jpegThumbnail",
|
|
99
|
+
"thumbnailEncSha256",
|
|
100
|
+
"thumbnailSha256",
|
|
101
|
+
"thumbnailDirectPath",
|
|
102
|
+
"firstFrameSidecar",
|
|
103
|
+
"streamingSidecar",
|
|
104
|
+
"scansSidecar",
|
|
105
|
+
"callKey",
|
|
106
|
+
"midQualityFileSha256",
|
|
107
|
+
]) || null;
|
|
108
|
+
}
|
|
109
|
+
if (this.config.citation) {
|
|
110
|
+
const jidMapping = [(_4 = structure.roomId) === null || _4 === void 0 ? void 0 : _4.split("@")[0], (_5 = structure.senderId) === null || _5 === void 0 ? void 0 : _5.split("@")[0]];
|
|
111
|
+
for (const key of Object.keys(this.config.citation)) {
|
|
112
|
+
const citationKey = `is${key[0].toUpperCase()}${key.slice(1)}`;
|
|
113
|
+
const output = await this.config.citation[key]();
|
|
114
|
+
structure.citation = { ...(structure.citation || {}), [citationKey]: (0, Utils_1.compareValue)(output, jidMapping) };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (chatRepliedId) {
|
|
118
|
+
const chatRepliedRoom = (_6 = this.store.messages[structure.roomId]) === null || _6 === void 0 ? void 0 : _6.get(chatRepliedId);
|
|
119
|
+
const chatRepliedSender = (_7 = this.store.messages[structure.senderId]) === null || _7 === void 0 ? void 0 : _7.get(chatRepliedId);
|
|
120
|
+
if (!chatRepliedRoom && !chatRepliedSender)
|
|
121
|
+
return structure;
|
|
122
|
+
structure.reply = (await this.handle(chatRepliedRoom || chatRepliedSender));
|
|
123
|
+
}
|
|
124
|
+
return structure;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.MessageParser = MessageParser;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VERIFIED_PLATFORM } from "../Modules/Config";
|
|
2
|
+
export type FakeVerifiedEnum = keyof typeof VERIFIED_PLATFORM;
|
|
3
|
+
export type SendActionType = {
|
|
4
|
+
asReply?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type ReplyActionType = {
|
|
7
|
+
footer?: string;
|
|
8
|
+
fakeVerified?: FakeVerifiedEnum;
|
|
9
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MessageBaseContent } from "./Message";
|
|
2
|
+
export type AuthType = "pairing" | "qr";
|
|
3
|
+
export type CitationConfig = {
|
|
4
|
+
[key: string]: (() => string[]) | (() => Promise<string[]>);
|
|
5
|
+
};
|
|
6
|
+
export interface BaseClientConfig {
|
|
7
|
+
prefix?: string;
|
|
8
|
+
ignoreMe?: boolean;
|
|
9
|
+
authPath?: string;
|
|
10
|
+
authType: AuthType;
|
|
11
|
+
showLogs?: boolean;
|
|
12
|
+
autoMentions?: boolean;
|
|
13
|
+
autoOnline?: boolean;
|
|
14
|
+
autoRead?: boolean;
|
|
15
|
+
autoRejectCall?: boolean;
|
|
16
|
+
citation?: CitationConfig;
|
|
17
|
+
}
|
|
18
|
+
export interface PairingClientConfig extends BaseClientConfig {
|
|
19
|
+
authType: "pairing";
|
|
20
|
+
phoneNumber: number;
|
|
21
|
+
}
|
|
22
|
+
export interface QRClientConfig extends BaseClientConfig {
|
|
23
|
+
authType: "qr";
|
|
24
|
+
}
|
|
25
|
+
export type ClientConfig = PairingClientConfig | QRClientConfig;
|
|
26
|
+
export interface BaseContext {
|
|
27
|
+
}
|
|
28
|
+
export interface ConnectionContext extends BaseContext {
|
|
29
|
+
status: "connecting" | "open" | "close";
|
|
30
|
+
}
|
|
31
|
+
export interface ErrorContext extends BaseContext {
|
|
32
|
+
error: Error;
|
|
33
|
+
}
|
|
34
|
+
export interface ClientEvents<B> {
|
|
35
|
+
connection: (ctx: ConnectionContext) => void;
|
|
36
|
+
message: (ctx: MessageBaseContent<B>) => void;
|
|
37
|
+
error: (ctx: ErrorContext) => void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { proto, WABusinessProfile } from "@whiskeysockets/baileys";
|
|
4
|
+
import { MESSAGE_TYPE } from "../Modules/Config";
|
|
5
|
+
export type MessageTypeEnum = (typeof MESSAGE_TYPE)[keyof typeof MESSAGE_TYPE];
|
|
6
|
+
export type DeviceTypeEnum = "unknown" | "android" | "ios" | "desktop" | "web";
|
|
7
|
+
export type ExtractCitationType<T> = {
|
|
8
|
+
[K in keyof T as `is${Capitalize<K & string>}`]: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type MessageBaseContent<T> = {
|
|
11
|
+
fromMe: boolean;
|
|
12
|
+
chatId: string;
|
|
13
|
+
roomId: string;
|
|
14
|
+
roomImage: () => Promise<string | null>;
|
|
15
|
+
senderId: string;
|
|
16
|
+
senderName: string;
|
|
17
|
+
senderDevice: DeviceTypeEnum;
|
|
18
|
+
senderBio: () => Promise<string | null>;
|
|
19
|
+
senderImage: () => Promise<string | null>;
|
|
20
|
+
senderBusiness: () => Promise<WABusinessProfile | null>;
|
|
21
|
+
chatType: MessageTypeEnum;
|
|
22
|
+
timestamp: number;
|
|
23
|
+
text: string;
|
|
24
|
+
command: string;
|
|
25
|
+
mentions: string[] | null;
|
|
26
|
+
isGroup: boolean;
|
|
27
|
+
isStory: boolean;
|
|
28
|
+
isEdited: boolean;
|
|
29
|
+
isChannel: boolean;
|
|
30
|
+
isBroadcast: boolean;
|
|
31
|
+
isEphemeral: boolean;
|
|
32
|
+
isForwarded: boolean;
|
|
33
|
+
citation: {
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
} | null;
|
|
36
|
+
media: {
|
|
37
|
+
buffer?: () => Promise<Buffer | null>;
|
|
38
|
+
stream?: () => Promise<Buffer | null>;
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
} | null;
|
|
41
|
+
reply: MessageBaseContent<T> | null;
|
|
42
|
+
key: () => proto.IMessageKey;
|
|
43
|
+
message: () => proto.IWebMessageInfo;
|
|
44
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,183 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Decode a JID
|
|
7
|
-
* @param jid The JID to decode
|
|
8
|
-
* @returns The decoded JID
|
|
9
|
-
*/
|
|
10
|
-
declare const decodeJid: (jid: string) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Serialize a message
|
|
13
|
-
* @param client The Baileys client
|
|
14
|
-
* @param msg The message to serialize
|
|
15
|
-
* @returns The serialized message
|
|
16
|
-
*/
|
|
17
|
-
declare function Serialize(client: Client['client'], config: Client, msg: any): SerializedMessage | undefined;
|
|
18
|
-
interface SerializedMessage {
|
|
19
|
-
roomId: string;
|
|
20
|
-
roomType: RoomType;
|
|
21
|
-
senderId: string;
|
|
22
|
-
senderName: string;
|
|
23
|
-
isMe: boolean;
|
|
24
|
-
isBot: boolean;
|
|
25
|
-
isMedia: boolean;
|
|
26
|
-
isEphemeral: boolean;
|
|
27
|
-
isAuthor: boolean;
|
|
28
|
-
msgType: string;
|
|
29
|
-
msgBody: string;
|
|
30
|
-
msgMentions: string[];
|
|
31
|
-
msgExpiration: number;
|
|
32
|
-
msgTimestamp: number;
|
|
33
|
-
msgMedia?: {
|
|
34
|
-
url: string;
|
|
35
|
-
mimetype: string;
|
|
36
|
-
size: number;
|
|
37
|
-
height: number;
|
|
38
|
-
width: number;
|
|
39
|
-
isAnimated: boolean;
|
|
40
|
-
isAvatar: boolean;
|
|
41
|
-
isAiSticker: boolean;
|
|
42
|
-
isLottie: boolean;
|
|
43
|
-
};
|
|
44
|
-
msgQuoted?: SerializedMessage;
|
|
45
|
-
payload(): baileys.WAProto.IWebMessageInfo;
|
|
46
|
-
key(): baileys.WAProto.IMessageKey;
|
|
47
|
-
}
|
|
48
|
-
type RoomType = 'group' | 'private' | 'channel';
|
|
49
|
-
|
|
50
|
-
interface ClientProps {
|
|
51
|
-
phoneNumber: number;
|
|
52
|
-
method: 'pairing';
|
|
53
|
-
showLogs?: boolean;
|
|
54
|
-
markOnline?: boolean;
|
|
55
|
-
autoRead?: boolean;
|
|
56
|
-
authors?: number[];
|
|
57
|
-
ignoreMe?: boolean;
|
|
58
|
-
}
|
|
59
|
-
declare class Client {
|
|
60
|
-
private client;
|
|
61
|
-
private listeners;
|
|
62
|
-
private pino;
|
|
63
|
-
private authPath;
|
|
64
|
-
private credsPath;
|
|
65
|
-
private storePath;
|
|
66
|
-
private logger;
|
|
67
|
-
private actions;
|
|
68
|
-
readonly phoneNumber: number;
|
|
69
|
-
readonly method: 'pairing';
|
|
70
|
-
readonly showLogs: boolean;
|
|
71
|
-
readonly markOnline: boolean;
|
|
72
|
-
readonly autoRead: boolean;
|
|
73
|
-
readonly authors: number[];
|
|
74
|
-
readonly ignoreMe: boolean;
|
|
75
|
-
constructor(props: ClientProps);
|
|
76
|
-
initialize(): Promise<void>;
|
|
77
|
-
private pairingCode;
|
|
78
|
-
private handler;
|
|
79
|
-
private emit;
|
|
80
|
-
on(event: string, callback: (data: SerializedMessage) => void): void;
|
|
81
|
-
parseMentions(text: any): any;
|
|
82
|
-
send(data: SerializedMessage, text: any): Promise<SerializedMessage | undefined>;
|
|
83
|
-
reply(data: any, text: any): Promise<SerializedMessage | undefined>;
|
|
84
|
-
edit(data: any, target: any, text: any): Promise<SerializedMessage | undefined>;
|
|
85
|
-
reaction(data: any, emoji: any): Promise<SerializedMessage | undefined>;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
declare class Actions {
|
|
89
|
-
private client;
|
|
90
|
-
constructor(client: Client['client']);
|
|
91
|
-
getGroupName(id: string): any;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
declare class Logger {
|
|
95
|
-
private bannerLogo;
|
|
96
|
-
private copyright;
|
|
97
|
-
private client;
|
|
98
|
-
private actions;
|
|
99
|
-
private spinner;
|
|
100
|
-
constructor(client: Logger['client']);
|
|
101
|
-
banner(): void;
|
|
102
|
-
msgLogs(data: SerializedMessage): Promise<void>;
|
|
103
|
-
runSpinner(text: string): void;
|
|
104
|
-
editSpinner(text: string): void;
|
|
105
|
-
stopSpinner(status: ("succeed" | "fail" | "warn" | "info") | undefined, text: string): void;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
declare const bLog: BLog;
|
|
109
|
-
declare const cLog: {
|
|
110
|
-
(...data: any[]): void;
|
|
111
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
112
|
-
};
|
|
113
|
-
declare const cache: NodeCache;
|
|
114
|
-
declare const logBlock: (status?: "succeed" | "fail" | "warn" | "info") => any;
|
|
115
|
-
declare const sleep: (ms: number) => Promise<unknown>;
|
|
116
|
-
|
|
117
|
-
declare const MESSAGE_TYPE: {
|
|
118
|
-
readonly text: "text";
|
|
119
|
-
readonly conversation: "text";
|
|
120
|
-
readonly imageMessage: "image";
|
|
121
|
-
readonly contactMessage: "contact";
|
|
122
|
-
readonly locationMessage: "location";
|
|
123
|
-
readonly extendedTextMessage: "text";
|
|
124
|
-
readonly documentMessage: "document";
|
|
125
|
-
readonly audioMessage: "audio";
|
|
126
|
-
readonly videoMessage: "video";
|
|
127
|
-
readonly protocolMessage: "protocol";
|
|
128
|
-
readonly contactsArrayMessage: "contactsArray";
|
|
129
|
-
readonly highlyStructuredMessage: "highlyStructured";
|
|
130
|
-
readonly sendPaymentMessage: "sendPayment";
|
|
131
|
-
readonly liveLocationMessage: "liveLocation";
|
|
132
|
-
readonly requestPaymentMessage: "requestPayment";
|
|
133
|
-
readonly declinePaymentRequestMessage: "declinePaymentRequest";
|
|
134
|
-
readonly cancelPaymentRequestMessage: "cancelPaymentRequest";
|
|
135
|
-
readonly templateMessage: "template";
|
|
136
|
-
readonly stickerMessage: "sticker";
|
|
137
|
-
readonly groupInviteMessage: "groupInvite";
|
|
138
|
-
readonly templateButtonReplyMessage: "templateButtonReply";
|
|
139
|
-
readonly productMessage: "product";
|
|
140
|
-
readonly deviceSentMessage: "deviceSent";
|
|
141
|
-
readonly listMessage: "list";
|
|
142
|
-
readonly viewOnceMessage: "viewOnce";
|
|
143
|
-
readonly orderMessage: "order";
|
|
144
|
-
readonly listResponseMessage: "listResponse";
|
|
145
|
-
readonly ephemeralMessage: "ephemeral";
|
|
146
|
-
readonly invoiceMessage: "invoice";
|
|
147
|
-
readonly buttonsMessage: "buttons";
|
|
148
|
-
readonly buttonsResponseMessage: "buttonsResponse";
|
|
149
|
-
readonly paymentInviteMessage: "paymentInvite";
|
|
150
|
-
readonly interactiveMessage: "interactive";
|
|
151
|
-
readonly reactionMessage: "reaction";
|
|
152
|
-
readonly stickerSyncRmrMessage: "sticker";
|
|
153
|
-
readonly interactiveResponseMessage: "interactiveResponse";
|
|
154
|
-
readonly pollCreationMessage: "pollCreation";
|
|
155
|
-
readonly pollUpdateMessage: "pollUpdate";
|
|
156
|
-
readonly keepInChatMessage: "keepInChat";
|
|
157
|
-
readonly documentWithCaptionMessage: "document";
|
|
158
|
-
readonly requestPhoneNumberMessage: "requestPhoneNumber";
|
|
159
|
-
readonly viewOnceMessageV2: "viewOnce";
|
|
160
|
-
readonly encReactionMessage: "reaction";
|
|
161
|
-
readonly editedMessage: "text";
|
|
162
|
-
readonly viewOnceMessageV2Extension: "viewOnce";
|
|
163
|
-
readonly pollCreationMessageV2: "pollCreation";
|
|
164
|
-
readonly scheduledCallCreationMessage: "scheduledCallCreation";
|
|
165
|
-
readonly groupMentionedMessage: "groupMentioned";
|
|
166
|
-
readonly pinInChatMessage: "pinInChat";
|
|
167
|
-
readonly pollCreationMessageV3: "pollCreation";
|
|
168
|
-
readonly scheduledCallEditMessage: "scheduledCallEdit";
|
|
169
|
-
readonly ptvMessage: "ptv";
|
|
170
|
-
readonly botInvokeMessage: "botInvoke";
|
|
171
|
-
readonly callLogMesssage: "callLog";
|
|
172
|
-
readonly encCommentMessage: "encComment";
|
|
173
|
-
readonly bcallMessage: "bcall";
|
|
174
|
-
readonly lottieStickerMessage: "lottieSticker";
|
|
175
|
-
readonly eventMessage: "event";
|
|
176
|
-
readonly commentMessage: "comment";
|
|
177
|
-
readonly newsletterAdminInviteMessage: "text";
|
|
178
|
-
readonly extendedTextMessageWithParentKey: "text";
|
|
179
|
-
readonly placeholderMessage: "placeholder";
|
|
180
|
-
readonly encEventUpdateMessage: "encEventUpdate";
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export { Actions, Client, Logger, MESSAGE_TYPE, Serialize, type SerializedMessage, bLog, cLog, cache, decodeJid, logBlock, sleep };
|
|
1
|
+
import { Client } from "./Modules/Client";
|
|
2
|
+
export { Client };
|
|
3
|
+
export default Client;
|