@arcaelas/whatsapp 2.2.0 → 3.0.1
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/build/cjs/decorators.d.ts +9 -0
- package/build/cjs/decorators.js +26 -0
- package/build/cjs/decorators.js.map +1 -0
- package/build/cjs/index.d.ts +6 -10
- package/build/cjs/index.js +11 -10
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/lib/bot/decorator.d.ts +77 -0
- package/build/cjs/lib/bot/decorator.js +219 -0
- package/build/cjs/lib/bot/decorator.js.map +1 -0
- package/build/cjs/lib/bot/decorators.d.ts +113 -0
- package/build/cjs/lib/bot/decorators.js +253 -0
- package/build/cjs/lib/bot/decorators.js.map +1 -0
- package/build/cjs/lib/bot/index.d.ts +3 -0
- package/build/cjs/lib/bot/index.js +20 -0
- package/build/cjs/lib/bot/index.js.map +1 -0
- package/build/cjs/lib/chat/index.d.ts +227 -0
- package/build/cjs/lib/chat/index.js +324 -0
- package/build/cjs/lib/chat/index.js.map +1 -0
- package/build/cjs/lib/contact/index.d.ts +203 -0
- package/build/cjs/lib/contact/index.js +226 -0
- package/build/cjs/lib/contact/index.js.map +1 -0
- package/build/cjs/lib/message/index.d.ts +228 -0
- package/build/cjs/lib/message/index.js +678 -0
- package/build/cjs/lib/message/index.js.map +1 -0
- package/build/cjs/lib/store/engine/index.d.ts +34 -0
- package/build/cjs/lib/store/engine/index.js +13 -0
- package/build/cjs/lib/store/engine/index.js.map +1 -0
- package/build/cjs/lib/store/engine/lib/file_system/index.d.ts +56 -0
- package/build/cjs/lib/store/engine/lib/file_system/index.js +160 -0
- package/build/cjs/lib/store/engine/lib/file_system/index.js.map +1 -0
- package/build/cjs/lib/store/engine/lib/redis/index.d.ts +82 -0
- package/build/cjs/lib/store/engine/lib/redis/index.js +132 -0
- package/build/cjs/lib/store/engine/lib/redis/index.js.map +1 -0
- package/build/cjs/lib/store/index.d.ts +22 -0
- package/build/cjs/lib/store/index.js +38 -0
- package/build/cjs/lib/store/index.js.map +1 -0
- package/build/cjs/lib/whatsapp/index.d.ts +179 -0
- package/build/cjs/lib/whatsapp/index.js +754 -0
- package/build/cjs/lib/whatsapp/index.js.map +1 -0
- package/build/esm/decorators.d.ts +9 -0
- package/build/esm/decorators.js +9 -0
- package/build/esm/decorators.js.map +1 -0
- package/build/esm/index.d.ts +6 -10
- package/build/esm/index.js +4 -6
- package/build/esm/index.js.map +1 -1
- package/build/esm/lib/bot/decorator.d.ts +77 -0
- package/build/esm/lib/bot/decorator.js +210 -0
- package/build/esm/lib/bot/decorator.js.map +1 -0
- package/build/esm/lib/bot/decorators.d.ts +113 -0
- package/build/esm/lib/bot/decorators.js +242 -0
- package/build/esm/lib/bot/decorators.js.map +1 -0
- package/build/esm/lib/bot/index.d.ts +3 -0
- package/build/esm/lib/bot/index.js +3 -0
- package/build/esm/lib/bot/index.js.map +1 -0
- package/build/esm/lib/chat/index.d.ts +227 -0
- package/build/esm/lib/chat/index.js +319 -0
- package/build/esm/lib/chat/index.js.map +1 -0
- package/build/esm/lib/contact/index.d.ts +203 -0
- package/build/esm/lib/contact/index.js +221 -0
- package/build/esm/lib/contact/index.js.map +1 -0
- package/build/esm/lib/message/index.d.ts +228 -0
- package/build/esm/lib/message/index.js +666 -0
- package/build/esm/lib/message/index.js.map +1 -0
- package/build/esm/lib/store/engine/index.d.ts +34 -0
- package/build/esm/lib/store/engine/index.js +8 -0
- package/build/esm/lib/store/engine/index.js.map +1 -0
- package/build/esm/lib/store/engine/lib/file_system/index.d.ts +56 -0
- package/build/esm/lib/store/engine/lib/file_system/index.js +156 -0
- package/build/esm/lib/store/engine/lib/file_system/index.js.map +1 -0
- package/build/esm/lib/store/engine/lib/redis/index.d.ts +82 -0
- package/build/esm/lib/store/engine/lib/redis/index.js +128 -0
- package/build/esm/lib/store/engine/lib/redis/index.js.map +1 -0
- package/build/esm/lib/store/index.d.ts +22 -0
- package/build/esm/lib/store/index.js +31 -0
- package/build/esm/lib/store/index.js.map +1 -0
- package/build/esm/lib/whatsapp/index.d.ts +179 -0
- package/build/esm/lib/whatsapp/index.js +714 -0
- package/build/esm/lib/whatsapp/index.js.map +1 -0
- package/package.json +8 -6
- package/build/cjs/Chat.d.ts +0 -317
- package/build/cjs/Chat.js +0 -275
- package/build/cjs/Chat.js.map +0 -1
- package/build/cjs/Contact.d.ts +0 -1163
- package/build/cjs/Contact.js +0 -162
- package/build/cjs/Contact.js.map +0 -1
- package/build/cjs/Message.d.ts +0 -902
- package/build/cjs/Message.js +0 -515
- package/build/cjs/Message.js.map +0 -1
- package/build/cjs/WhatsApp.d.ts +0 -80
- package/build/cjs/WhatsApp.js +0 -412
- package/build/cjs/WhatsApp.js.map +0 -1
- package/build/cjs/store/driver/FileEngine.d.ts +0 -34
- package/build/cjs/store/driver/FileEngine.js +0 -86
- package/build/cjs/store/driver/FileEngine.js.map +0 -1
- package/build/cjs/store/driver/RedisEngine.d.ts +0 -47
- package/build/cjs/store/driver/RedisEngine.js +0 -70
- package/build/cjs/store/driver/RedisEngine.js.map +0 -1
- package/build/cjs/store/engine.d.ts +0 -53
- package/build/cjs/store/engine.js +0 -7
- package/build/cjs/store/engine.js.map +0 -1
- package/build/cjs/store/index.d.ts +0 -8
- package/build/cjs/store/index.js +0 -12
- package/build/cjs/store/index.js.map +0 -1
- package/build/esm/Chat.d.ts +0 -317
- package/build/esm/Chat.js +0 -270
- package/build/esm/Chat.js.map +0 -1
- package/build/esm/Contact.d.ts +0 -1163
- package/build/esm/Contact.js +0 -157
- package/build/esm/Contact.js.map +0 -1
- package/build/esm/Message.d.ts +0 -902
- package/build/esm/Message.js +0 -510
- package/build/esm/Message.js.map +0 -1
- package/build/esm/WhatsApp.d.ts +0 -80
- package/build/esm/WhatsApp.js +0 -372
- package/build/esm/WhatsApp.js.map +0 -1
- package/build/esm/store/driver/FileEngine.d.ts +0 -34
- package/build/esm/store/driver/FileEngine.js +0 -82
- package/build/esm/store/driver/FileEngine.js.map +0 -1
- package/build/esm/store/driver/RedisEngine.d.ts +0 -47
- package/build/esm/store/driver/RedisEngine.js +0 -66
- package/build/esm/store/driver/RedisEngine.js.map +0 -1
- package/build/esm/store/engine.d.ts +0 -53
- package/build/esm/store/engine.js +0 -6
- package/build/esm/store/engine.js.map +0 -1
- package/build/esm/store/index.d.ts +0 -8
- package/build/esm/store/index.js +0 -7
- package/build/esm/store/index.js.map +0 -1
package/build/cjs/Message.d.ts
DELETED
|
@@ -1,902 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Message.ts
|
|
3
|
-
* @description Clase Message para gestión de mensajes de WhatsApp
|
|
4
|
-
*/
|
|
5
|
-
import type { WAMessage } from 'baileys';
|
|
6
|
-
import { Readable } from 'node:stream';
|
|
7
|
-
import type { WhatsApp } from './WhatsApp';
|
|
8
|
-
/**
|
|
9
|
-
* @description Tipos de mensaje soportados.
|
|
10
|
-
* Supported message types.
|
|
11
|
-
*/
|
|
12
|
-
export type MessageType = 'text' | 'image' | 'video' | 'audio' | 'location' | 'poll';
|
|
13
|
-
/**
|
|
14
|
-
* @description Estados de un mensaje.
|
|
15
|
-
* Message delivery statuses.
|
|
16
|
-
*/
|
|
17
|
-
export declare enum MESSAGE_STATUS {
|
|
18
|
-
/** Error al enviar / Send error */
|
|
19
|
-
ERROR = 0,
|
|
20
|
-
/** Mensaje pendiente de envío / Pending send */
|
|
21
|
-
PENDING = 1,
|
|
22
|
-
/** Servidor recibió el mensaje / Server acknowledged */
|
|
23
|
-
SERVER_ACK = 2,
|
|
24
|
-
/** Mensaje entregado al destinatario / Delivered */
|
|
25
|
-
DELIVERED = 3,
|
|
26
|
-
/** Mensaje leído por el destinatario / Read */
|
|
27
|
-
READ = 4,
|
|
28
|
-
/** Mensaje reproducido (audio/video) / Played */
|
|
29
|
-
PLAYED = 5
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @description Opciones para crear encuesta.
|
|
33
|
-
* Poll creation options.
|
|
34
|
-
*/
|
|
35
|
-
export interface PollOptions {
|
|
36
|
-
/** Pregunta o título de la encuesta / Poll question or title */
|
|
37
|
-
content: string;
|
|
38
|
-
/** Opciones de respuesta / Answer options */
|
|
39
|
-
options: Array<{
|
|
40
|
-
content: string;
|
|
41
|
-
}>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @description Opciones para enviar ubicación.
|
|
45
|
-
* Location send options.
|
|
46
|
-
*/
|
|
47
|
-
export interface LocationOptions {
|
|
48
|
-
/** Latitud en grados / Latitude in degrees */
|
|
49
|
-
lat: number;
|
|
50
|
-
/** Longitud en grados / Longitude in degrees */
|
|
51
|
-
lng: number;
|
|
52
|
-
/** true para ubicación en tiempo real / true for live location */
|
|
53
|
-
live?: boolean;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* @description Datos del índice de mensaje (sin content ni raw completo).
|
|
57
|
-
* Message index data (without content or full raw).
|
|
58
|
-
*/
|
|
59
|
-
export interface IMessageIndex {
|
|
60
|
-
/** ID único del mensaje / Unique message ID */
|
|
61
|
-
id: string;
|
|
62
|
-
/** ID del chat / Chat ID */
|
|
63
|
-
cid: string;
|
|
64
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
65
|
-
mid: string | null;
|
|
66
|
-
/** Si el mensaje es propio / Whether the message is own */
|
|
67
|
-
me: boolean;
|
|
68
|
-
/** Tipo de mensaje / Message type */
|
|
69
|
-
type: MessageType;
|
|
70
|
-
/** Autor del mensaje / Message author */
|
|
71
|
-
author: string;
|
|
72
|
-
/** Estado de entrega / Delivery status */
|
|
73
|
-
status: MESSAGE_STATUS;
|
|
74
|
-
/** Si está destacado / Whether it's starred */
|
|
75
|
-
starred: boolean;
|
|
76
|
-
/** Si fue reenviado / Whether it was forwarded */
|
|
77
|
-
forwarded: boolean;
|
|
78
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
79
|
-
created_at: number;
|
|
80
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
81
|
-
deleted_at: number | null;
|
|
82
|
-
/** Tipo MIME / MIME type */
|
|
83
|
-
mime: string;
|
|
84
|
-
/** Caption del mensaje / Message caption */
|
|
85
|
-
caption: string;
|
|
86
|
-
/** true si fue editado / true if edited */
|
|
87
|
-
edited: boolean;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* @description Datos completos del mensaje.
|
|
91
|
-
* Full message data.
|
|
92
|
-
*/
|
|
93
|
-
export interface IMessage {
|
|
94
|
-
/** Índice del mensaje / Message index */
|
|
95
|
-
index: IMessageIndex;
|
|
96
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
97
|
-
raw: WAMessage;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @description Mapeo de tipos de contenido de Baileys a MessageType.
|
|
101
|
-
* Baileys content type to MessageType mapping.
|
|
102
|
-
*/
|
|
103
|
-
export declare const MESSAGE_TYPE_MAP: Record<string, MessageType>;
|
|
104
|
-
/**
|
|
105
|
-
* @description Construye IMessageIndex desde WAMessage.
|
|
106
|
-
* Builds IMessageIndex from WAMessage.
|
|
107
|
-
*/
|
|
108
|
-
declare function build_message_index(raw: WAMessage, edited?: boolean): IMessageIndex;
|
|
109
|
-
/**
|
|
110
|
-
* @description
|
|
111
|
-
* Clase base para representar un mensaje de WhatsApp.
|
|
112
|
-
* Base class representing a WhatsApp message.
|
|
113
|
-
*/
|
|
114
|
-
export declare class Message {
|
|
115
|
-
/** Índice del mensaje / Message index */
|
|
116
|
-
readonly index: IMessageIndex;
|
|
117
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
118
|
-
readonly raw: WAMessage;
|
|
119
|
-
constructor(data: IMessage);
|
|
120
|
-
/** ID único del mensaje / Unique message ID */
|
|
121
|
-
get id(): string;
|
|
122
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
123
|
-
get cid(): string;
|
|
124
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
125
|
-
get mid(): string | null;
|
|
126
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
127
|
-
get me(): boolean;
|
|
128
|
-
/** Autor del mensaje / Message author */
|
|
129
|
-
get author(): string;
|
|
130
|
-
/** true si el mensaje fue editado / true if edited */
|
|
131
|
-
get edited(): boolean;
|
|
132
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
133
|
-
get type(): MessageType;
|
|
134
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
135
|
-
get caption(): string;
|
|
136
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
137
|
-
get mime(): string;
|
|
138
|
-
/** Estado del mensaje / Message status */
|
|
139
|
-
get status(): MESSAGE_STATUS;
|
|
140
|
-
/** true si el mensaje está destacado / true if starred */
|
|
141
|
-
get starred(): boolean;
|
|
142
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
143
|
-
get forwarded(): boolean;
|
|
144
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
145
|
-
get created_at(): number;
|
|
146
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
147
|
-
get deleted_at(): number | null;
|
|
148
|
-
/**
|
|
149
|
-
* @description Obtiene el contenido como Readable stream.
|
|
150
|
-
* Gets content as Readable stream.
|
|
151
|
-
*/
|
|
152
|
-
stream(): Promise<Readable>;
|
|
153
|
-
/**
|
|
154
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
155
|
-
* Gets message content as Buffer.
|
|
156
|
-
*/
|
|
157
|
-
content(): Promise<Buffer>;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* @description Factory que retorna la clase Message enlazada al contexto.
|
|
161
|
-
* Factory that returns the Message class bound to context.
|
|
162
|
-
* @param wa Instancia de WhatsApp.
|
|
163
|
-
*/
|
|
164
|
-
export declare function message(wa: WhatsApp): {
|
|
165
|
-
new (data: IMessage): {
|
|
166
|
-
/**
|
|
167
|
-
* @description Edita el mensaje (solo texto o caption, solo mensajes propios).
|
|
168
|
-
* Edits the message (text or caption only, own messages only).
|
|
169
|
-
*/
|
|
170
|
-
edit(text: string): Promise<boolean>;
|
|
171
|
-
/**
|
|
172
|
-
* @description Elimina el mensaje para todos.
|
|
173
|
-
* Deletes the message for everyone.
|
|
174
|
-
*/
|
|
175
|
-
remove(): Promise<boolean>;
|
|
176
|
-
/**
|
|
177
|
-
* @description Reenvía el mensaje a otro chat.
|
|
178
|
-
* Forwards the message to another chat.
|
|
179
|
-
*/
|
|
180
|
-
forward(to_cid: string): Promise<boolean>;
|
|
181
|
-
/**
|
|
182
|
-
* @description Reacciona al mensaje.
|
|
183
|
-
* Reacts to the message.
|
|
184
|
-
* @param emoji Emoji de reacción (vacío para quitar) / Reaction emoji (empty to remove).
|
|
185
|
-
*/
|
|
186
|
-
react(emoji: string): Promise<boolean>;
|
|
187
|
-
/**
|
|
188
|
-
* @description Responde con un mensaje de texto.
|
|
189
|
-
* Replies with a text message.
|
|
190
|
-
*/
|
|
191
|
-
text(content: string): Promise</*elided*/ any | null>;
|
|
192
|
-
/**
|
|
193
|
-
* @description Responde con una imagen.
|
|
194
|
-
* Replies with an image.
|
|
195
|
-
*/
|
|
196
|
-
image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
197
|
-
/**
|
|
198
|
-
* @description Responde con un video.
|
|
199
|
-
* Replies with a video.
|
|
200
|
-
*/
|
|
201
|
-
video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
202
|
-
/**
|
|
203
|
-
* @description Responde con un audio.
|
|
204
|
-
* Replies with an audio.
|
|
205
|
-
*/
|
|
206
|
-
audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
|
|
207
|
-
/**
|
|
208
|
-
* @description Responde con una ubicacion.
|
|
209
|
-
* Replies with a location.
|
|
210
|
-
*/
|
|
211
|
-
location(opts: LocationOptions): Promise</*elided*/ any | null>;
|
|
212
|
-
/**
|
|
213
|
-
* @description Responde con una encuesta.
|
|
214
|
-
* Replies with a poll.
|
|
215
|
-
*/
|
|
216
|
-
poll(opts: PollOptions): Promise</*elided*/ any | null>;
|
|
217
|
-
/**
|
|
218
|
-
* @description Obtiene el contenido como Readable stream.
|
|
219
|
-
* Gets content as Readable stream.
|
|
220
|
-
*/
|
|
221
|
-
stream(): Promise<Readable>;
|
|
222
|
-
/**
|
|
223
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
224
|
-
* Gets message content as Buffer.
|
|
225
|
-
*/
|
|
226
|
-
content(): Promise<Buffer>;
|
|
227
|
-
/** Índice del mensaje / Message index */
|
|
228
|
-
readonly index: IMessageIndex;
|
|
229
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
230
|
-
readonly raw: WAMessage;
|
|
231
|
-
/** ID único del mensaje / Unique message ID */
|
|
232
|
-
get id(): string;
|
|
233
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
234
|
-
get cid(): string;
|
|
235
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
236
|
-
get mid(): string | null;
|
|
237
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
238
|
-
get me(): boolean;
|
|
239
|
-
/** Autor del mensaje / Message author */
|
|
240
|
-
get author(): string;
|
|
241
|
-
/** true si el mensaje fue editado / true if edited */
|
|
242
|
-
get edited(): boolean;
|
|
243
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
244
|
-
get type(): MessageType;
|
|
245
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
246
|
-
get caption(): string;
|
|
247
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
248
|
-
get mime(): string;
|
|
249
|
-
/** Estado del mensaje / Message status */
|
|
250
|
-
get status(): MESSAGE_STATUS;
|
|
251
|
-
/** true si el mensaje está destacado / true if starred */
|
|
252
|
-
get starred(): boolean;
|
|
253
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
254
|
-
get forwarded(): boolean;
|
|
255
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
256
|
-
get created_at(): number;
|
|
257
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
258
|
-
get deleted_at(): number | null;
|
|
259
|
-
};
|
|
260
|
-
/**
|
|
261
|
-
* @description Obtiene un mensaje por CID y MID.
|
|
262
|
-
* Retrieves a message by CID and MID.
|
|
263
|
-
*/
|
|
264
|
-
get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
|
|
265
|
-
/**
|
|
266
|
-
* @description Lista mensajes de un chat (paginado).
|
|
267
|
-
* Lists messages from a chat (paginated).
|
|
268
|
-
*/
|
|
269
|
-
list(cid: string, offset?: number, limit?: number): Promise<InstanceType</*elided*/ any>[]>;
|
|
270
|
-
/**
|
|
271
|
-
* @description Cuenta mensajes de un chat.
|
|
272
|
-
* Counts messages in a chat.
|
|
273
|
-
*/
|
|
274
|
-
count(cid: string): Promise<number>;
|
|
275
|
-
/**
|
|
276
|
-
* @description Envía un mensaje de texto.
|
|
277
|
-
* Sends a text message.
|
|
278
|
-
*/
|
|
279
|
-
text(cid: string, text: string, mid?: string): Promise<{
|
|
280
|
-
/**
|
|
281
|
-
* @description Edita el mensaje (solo texto o caption, solo mensajes propios).
|
|
282
|
-
* Edits the message (text or caption only, own messages only).
|
|
283
|
-
*/
|
|
284
|
-
edit(text: string): Promise<boolean>;
|
|
285
|
-
/**
|
|
286
|
-
* @description Elimina el mensaje para todos.
|
|
287
|
-
* Deletes the message for everyone.
|
|
288
|
-
*/
|
|
289
|
-
remove(): Promise<boolean>;
|
|
290
|
-
/**
|
|
291
|
-
* @description Reenvía el mensaje a otro chat.
|
|
292
|
-
* Forwards the message to another chat.
|
|
293
|
-
*/
|
|
294
|
-
forward(to_cid: string): Promise<boolean>;
|
|
295
|
-
/**
|
|
296
|
-
* @description Reacciona al mensaje.
|
|
297
|
-
* Reacts to the message.
|
|
298
|
-
* @param emoji Emoji de reacción (vacío para quitar) / Reaction emoji (empty to remove).
|
|
299
|
-
*/
|
|
300
|
-
react(emoji: string): Promise<boolean>;
|
|
301
|
-
/**
|
|
302
|
-
* @description Responde con un mensaje de texto.
|
|
303
|
-
* Replies with a text message.
|
|
304
|
-
*/
|
|
305
|
-
text(content: string): Promise</*elided*/ any | null>;
|
|
306
|
-
/**
|
|
307
|
-
* @description Responde con una imagen.
|
|
308
|
-
* Replies with an image.
|
|
309
|
-
*/
|
|
310
|
-
image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
311
|
-
/**
|
|
312
|
-
* @description Responde con un video.
|
|
313
|
-
* Replies with a video.
|
|
314
|
-
*/
|
|
315
|
-
video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
316
|
-
/**
|
|
317
|
-
* @description Responde con un audio.
|
|
318
|
-
* Replies with an audio.
|
|
319
|
-
*/
|
|
320
|
-
audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
|
|
321
|
-
/**
|
|
322
|
-
* @description Responde con una ubicacion.
|
|
323
|
-
* Replies with a location.
|
|
324
|
-
*/
|
|
325
|
-
location(opts: LocationOptions): Promise</*elided*/ any | null>;
|
|
326
|
-
/**
|
|
327
|
-
* @description Responde con una encuesta.
|
|
328
|
-
* Replies with a poll.
|
|
329
|
-
*/
|
|
330
|
-
poll(opts: PollOptions): Promise</*elided*/ any | null>;
|
|
331
|
-
/**
|
|
332
|
-
* @description Obtiene el contenido como Readable stream.
|
|
333
|
-
* Gets content as Readable stream.
|
|
334
|
-
*/
|
|
335
|
-
stream(): Promise<Readable>;
|
|
336
|
-
/**
|
|
337
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
338
|
-
* Gets message content as Buffer.
|
|
339
|
-
*/
|
|
340
|
-
content(): Promise<Buffer>;
|
|
341
|
-
/** Índice del mensaje / Message index */
|
|
342
|
-
readonly index: IMessageIndex;
|
|
343
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
344
|
-
readonly raw: WAMessage;
|
|
345
|
-
/** ID único del mensaje / Unique message ID */
|
|
346
|
-
get id(): string;
|
|
347
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
348
|
-
get cid(): string;
|
|
349
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
350
|
-
get mid(): string | null;
|
|
351
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
352
|
-
get me(): boolean;
|
|
353
|
-
/** Autor del mensaje / Message author */
|
|
354
|
-
get author(): string;
|
|
355
|
-
/** true si el mensaje fue editado / true if edited */
|
|
356
|
-
get edited(): boolean;
|
|
357
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
358
|
-
get type(): MessageType;
|
|
359
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
360
|
-
get caption(): string;
|
|
361
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
362
|
-
get mime(): string;
|
|
363
|
-
/** Estado del mensaje / Message status */
|
|
364
|
-
get status(): MESSAGE_STATUS;
|
|
365
|
-
/** true si el mensaje está destacado / true if starred */
|
|
366
|
-
get starred(): boolean;
|
|
367
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
368
|
-
get forwarded(): boolean;
|
|
369
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
370
|
-
get created_at(): number;
|
|
371
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
372
|
-
get deleted_at(): number | null;
|
|
373
|
-
} | null>;
|
|
374
|
-
/**
|
|
375
|
-
* @description Envía una imagen.
|
|
376
|
-
* Sends an image.
|
|
377
|
-
*/
|
|
378
|
-
image(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
|
|
379
|
-
/**
|
|
380
|
-
* @description Edita el mensaje (solo texto o caption, solo mensajes propios).
|
|
381
|
-
* Edits the message (text or caption only, own messages only).
|
|
382
|
-
*/
|
|
383
|
-
edit(text: string): Promise<boolean>;
|
|
384
|
-
/**
|
|
385
|
-
* @description Elimina el mensaje para todos.
|
|
386
|
-
* Deletes the message for everyone.
|
|
387
|
-
*/
|
|
388
|
-
remove(): Promise<boolean>;
|
|
389
|
-
/**
|
|
390
|
-
* @description Reenvía el mensaje a otro chat.
|
|
391
|
-
* Forwards the message to another chat.
|
|
392
|
-
*/
|
|
393
|
-
forward(to_cid: string): Promise<boolean>;
|
|
394
|
-
/**
|
|
395
|
-
* @description Reacciona al mensaje.
|
|
396
|
-
* Reacts to the message.
|
|
397
|
-
* @param emoji Emoji de reacción (vacío para quitar) / Reaction emoji (empty to remove).
|
|
398
|
-
*/
|
|
399
|
-
react(emoji: string): Promise<boolean>;
|
|
400
|
-
/**
|
|
401
|
-
* @description Responde con un mensaje de texto.
|
|
402
|
-
* Replies with a text message.
|
|
403
|
-
*/
|
|
404
|
-
text(content: string): Promise</*elided*/ any | null>;
|
|
405
|
-
/**
|
|
406
|
-
* @description Responde con una imagen.
|
|
407
|
-
* Replies with an image.
|
|
408
|
-
*/
|
|
409
|
-
image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
410
|
-
/**
|
|
411
|
-
* @description Responde con un video.
|
|
412
|
-
* Replies with a video.
|
|
413
|
-
*/
|
|
414
|
-
video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
415
|
-
/**
|
|
416
|
-
* @description Responde con un audio.
|
|
417
|
-
* Replies with an audio.
|
|
418
|
-
*/
|
|
419
|
-
audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
|
|
420
|
-
/**
|
|
421
|
-
* @description Responde con una ubicacion.
|
|
422
|
-
* Replies with a location.
|
|
423
|
-
*/
|
|
424
|
-
location(opts: LocationOptions): Promise</*elided*/ any | null>;
|
|
425
|
-
/**
|
|
426
|
-
* @description Responde con una encuesta.
|
|
427
|
-
* Replies with a poll.
|
|
428
|
-
*/
|
|
429
|
-
poll(opts: PollOptions): Promise</*elided*/ any | null>;
|
|
430
|
-
/**
|
|
431
|
-
* @description Obtiene el contenido como Readable stream.
|
|
432
|
-
* Gets content as Readable stream.
|
|
433
|
-
*/
|
|
434
|
-
stream(): Promise<Readable>;
|
|
435
|
-
/**
|
|
436
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
437
|
-
* Gets message content as Buffer.
|
|
438
|
-
*/
|
|
439
|
-
content(): Promise<Buffer>;
|
|
440
|
-
/** Índice del mensaje / Message index */
|
|
441
|
-
readonly index: IMessageIndex;
|
|
442
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
443
|
-
readonly raw: WAMessage;
|
|
444
|
-
/** ID único del mensaje / Unique message ID */
|
|
445
|
-
get id(): string;
|
|
446
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
447
|
-
get cid(): string;
|
|
448
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
449
|
-
get mid(): string | null;
|
|
450
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
451
|
-
get me(): boolean;
|
|
452
|
-
/** Autor del mensaje / Message author */
|
|
453
|
-
get author(): string;
|
|
454
|
-
/** true si el mensaje fue editado / true if edited */
|
|
455
|
-
get edited(): boolean;
|
|
456
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
457
|
-
get type(): MessageType;
|
|
458
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
459
|
-
get caption(): string;
|
|
460
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
461
|
-
get mime(): string;
|
|
462
|
-
/** Estado del mensaje / Message status */
|
|
463
|
-
get status(): MESSAGE_STATUS;
|
|
464
|
-
/** true si el mensaje está destacado / true if starred */
|
|
465
|
-
get starred(): boolean;
|
|
466
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
467
|
-
get forwarded(): boolean;
|
|
468
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
469
|
-
get created_at(): number;
|
|
470
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
471
|
-
get deleted_at(): number | null;
|
|
472
|
-
} | null>;
|
|
473
|
-
/**
|
|
474
|
-
* @description Envía un video.
|
|
475
|
-
* Sends a video.
|
|
476
|
-
*/
|
|
477
|
-
video(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
|
|
478
|
-
/**
|
|
479
|
-
* @description Edita el mensaje (solo texto o caption, solo mensajes propios).
|
|
480
|
-
* Edits the message (text or caption only, own messages only).
|
|
481
|
-
*/
|
|
482
|
-
edit(text: string): Promise<boolean>;
|
|
483
|
-
/**
|
|
484
|
-
* @description Elimina el mensaje para todos.
|
|
485
|
-
* Deletes the message for everyone.
|
|
486
|
-
*/
|
|
487
|
-
remove(): Promise<boolean>;
|
|
488
|
-
/**
|
|
489
|
-
* @description Reenvía el mensaje a otro chat.
|
|
490
|
-
* Forwards the message to another chat.
|
|
491
|
-
*/
|
|
492
|
-
forward(to_cid: string): Promise<boolean>;
|
|
493
|
-
/**
|
|
494
|
-
* @description Reacciona al mensaje.
|
|
495
|
-
* Reacts to the message.
|
|
496
|
-
* @param emoji Emoji de reacción (vacío para quitar) / Reaction emoji (empty to remove).
|
|
497
|
-
*/
|
|
498
|
-
react(emoji: string): Promise<boolean>;
|
|
499
|
-
/**
|
|
500
|
-
* @description Responde con un mensaje de texto.
|
|
501
|
-
* Replies with a text message.
|
|
502
|
-
*/
|
|
503
|
-
text(content: string): Promise</*elided*/ any | null>;
|
|
504
|
-
/**
|
|
505
|
-
* @description Responde con una imagen.
|
|
506
|
-
* Replies with an image.
|
|
507
|
-
*/
|
|
508
|
-
image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
509
|
-
/**
|
|
510
|
-
* @description Responde con un video.
|
|
511
|
-
* Replies with a video.
|
|
512
|
-
*/
|
|
513
|
-
video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
514
|
-
/**
|
|
515
|
-
* @description Responde con un audio.
|
|
516
|
-
* Replies with an audio.
|
|
517
|
-
*/
|
|
518
|
-
audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
|
|
519
|
-
/**
|
|
520
|
-
* @description Responde con una ubicacion.
|
|
521
|
-
* Replies with a location.
|
|
522
|
-
*/
|
|
523
|
-
location(opts: LocationOptions): Promise</*elided*/ any | null>;
|
|
524
|
-
/**
|
|
525
|
-
* @description Responde con una encuesta.
|
|
526
|
-
* Replies with a poll.
|
|
527
|
-
*/
|
|
528
|
-
poll(opts: PollOptions): Promise</*elided*/ any | null>;
|
|
529
|
-
/**
|
|
530
|
-
* @description Obtiene el contenido como Readable stream.
|
|
531
|
-
* Gets content as Readable stream.
|
|
532
|
-
*/
|
|
533
|
-
stream(): Promise<Readable>;
|
|
534
|
-
/**
|
|
535
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
536
|
-
* Gets message content as Buffer.
|
|
537
|
-
*/
|
|
538
|
-
content(): Promise<Buffer>;
|
|
539
|
-
/** Índice del mensaje / Message index */
|
|
540
|
-
readonly index: IMessageIndex;
|
|
541
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
542
|
-
readonly raw: WAMessage;
|
|
543
|
-
/** ID único del mensaje / Unique message ID */
|
|
544
|
-
get id(): string;
|
|
545
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
546
|
-
get cid(): string;
|
|
547
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
548
|
-
get mid(): string | null;
|
|
549
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
550
|
-
get me(): boolean;
|
|
551
|
-
/** Autor del mensaje / Message author */
|
|
552
|
-
get author(): string;
|
|
553
|
-
/** true si el mensaje fue editado / true if edited */
|
|
554
|
-
get edited(): boolean;
|
|
555
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
556
|
-
get type(): MessageType;
|
|
557
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
558
|
-
get caption(): string;
|
|
559
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
560
|
-
get mime(): string;
|
|
561
|
-
/** Estado del mensaje / Message status */
|
|
562
|
-
get status(): MESSAGE_STATUS;
|
|
563
|
-
/** true si el mensaje está destacado / true if starred */
|
|
564
|
-
get starred(): boolean;
|
|
565
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
566
|
-
get forwarded(): boolean;
|
|
567
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
568
|
-
get created_at(): number;
|
|
569
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
570
|
-
get deleted_at(): number | null;
|
|
571
|
-
} | null>;
|
|
572
|
-
/**
|
|
573
|
-
* @description Envía un audio.
|
|
574
|
-
* Sends an audio.
|
|
575
|
-
* @param ptt true para nota de voz (default true) / true for voice note (default true).
|
|
576
|
-
*/
|
|
577
|
-
audio(cid: string, buffer: Buffer, ptt?: boolean, mid?: string): Promise<{
|
|
578
|
-
/**
|
|
579
|
-
* @description Edita el mensaje (solo texto o caption, solo mensajes propios).
|
|
580
|
-
* Edits the message (text or caption only, own messages only).
|
|
581
|
-
*/
|
|
582
|
-
edit(text: string): Promise<boolean>;
|
|
583
|
-
/**
|
|
584
|
-
* @description Elimina el mensaje para todos.
|
|
585
|
-
* Deletes the message for everyone.
|
|
586
|
-
*/
|
|
587
|
-
remove(): Promise<boolean>;
|
|
588
|
-
/**
|
|
589
|
-
* @description Reenvía el mensaje a otro chat.
|
|
590
|
-
* Forwards the message to another chat.
|
|
591
|
-
*/
|
|
592
|
-
forward(to_cid: string): Promise<boolean>;
|
|
593
|
-
/**
|
|
594
|
-
* @description Reacciona al mensaje.
|
|
595
|
-
* Reacts to the message.
|
|
596
|
-
* @param emoji Emoji de reacción (vacío para quitar) / Reaction emoji (empty to remove).
|
|
597
|
-
*/
|
|
598
|
-
react(emoji: string): Promise<boolean>;
|
|
599
|
-
/**
|
|
600
|
-
* @description Responde con un mensaje de texto.
|
|
601
|
-
* Replies with a text message.
|
|
602
|
-
*/
|
|
603
|
-
text(content: string): Promise</*elided*/ any | null>;
|
|
604
|
-
/**
|
|
605
|
-
* @description Responde con una imagen.
|
|
606
|
-
* Replies with an image.
|
|
607
|
-
*/
|
|
608
|
-
image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
609
|
-
/**
|
|
610
|
-
* @description Responde con un video.
|
|
611
|
-
* Replies with a video.
|
|
612
|
-
*/
|
|
613
|
-
video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
614
|
-
/**
|
|
615
|
-
* @description Responde con un audio.
|
|
616
|
-
* Replies with an audio.
|
|
617
|
-
*/
|
|
618
|
-
audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
|
|
619
|
-
/**
|
|
620
|
-
* @description Responde con una ubicacion.
|
|
621
|
-
* Replies with a location.
|
|
622
|
-
*/
|
|
623
|
-
location(opts: LocationOptions): Promise</*elided*/ any | null>;
|
|
624
|
-
/**
|
|
625
|
-
* @description Responde con una encuesta.
|
|
626
|
-
* Replies with a poll.
|
|
627
|
-
*/
|
|
628
|
-
poll(opts: PollOptions): Promise</*elided*/ any | null>;
|
|
629
|
-
/**
|
|
630
|
-
* @description Obtiene el contenido como Readable stream.
|
|
631
|
-
* Gets content as Readable stream.
|
|
632
|
-
*/
|
|
633
|
-
stream(): Promise<Readable>;
|
|
634
|
-
/**
|
|
635
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
636
|
-
* Gets message content as Buffer.
|
|
637
|
-
*/
|
|
638
|
-
content(): Promise<Buffer>;
|
|
639
|
-
/** Índice del mensaje / Message index */
|
|
640
|
-
readonly index: IMessageIndex;
|
|
641
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
642
|
-
readonly raw: WAMessage;
|
|
643
|
-
/** ID único del mensaje / Unique message ID */
|
|
644
|
-
get id(): string;
|
|
645
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
646
|
-
get cid(): string;
|
|
647
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
648
|
-
get mid(): string | null;
|
|
649
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
650
|
-
get me(): boolean;
|
|
651
|
-
/** Autor del mensaje / Message author */
|
|
652
|
-
get author(): string;
|
|
653
|
-
/** true si el mensaje fue editado / true if edited */
|
|
654
|
-
get edited(): boolean;
|
|
655
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
656
|
-
get type(): MessageType;
|
|
657
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
658
|
-
get caption(): string;
|
|
659
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
660
|
-
get mime(): string;
|
|
661
|
-
/** Estado del mensaje / Message status */
|
|
662
|
-
get status(): MESSAGE_STATUS;
|
|
663
|
-
/** true si el mensaje está destacado / true if starred */
|
|
664
|
-
get starred(): boolean;
|
|
665
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
666
|
-
get forwarded(): boolean;
|
|
667
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
668
|
-
get created_at(): number;
|
|
669
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
670
|
-
get deleted_at(): number | null;
|
|
671
|
-
} | null>;
|
|
672
|
-
/**
|
|
673
|
-
* @description Envía una ubicación.
|
|
674
|
-
* Sends a location.
|
|
675
|
-
*/
|
|
676
|
-
location(cid: string, opts: LocationOptions, mid?: string): Promise<{
|
|
677
|
-
/**
|
|
678
|
-
* @description Edita el mensaje (solo texto o caption, solo mensajes propios).
|
|
679
|
-
* Edits the message (text or caption only, own messages only).
|
|
680
|
-
*/
|
|
681
|
-
edit(text: string): Promise<boolean>;
|
|
682
|
-
/**
|
|
683
|
-
* @description Elimina el mensaje para todos.
|
|
684
|
-
* Deletes the message for everyone.
|
|
685
|
-
*/
|
|
686
|
-
remove(): Promise<boolean>;
|
|
687
|
-
/**
|
|
688
|
-
* @description Reenvía el mensaje a otro chat.
|
|
689
|
-
* Forwards the message to another chat.
|
|
690
|
-
*/
|
|
691
|
-
forward(to_cid: string): Promise<boolean>;
|
|
692
|
-
/**
|
|
693
|
-
* @description Reacciona al mensaje.
|
|
694
|
-
* Reacts to the message.
|
|
695
|
-
* @param emoji Emoji de reacción (vacío para quitar) / Reaction emoji (empty to remove).
|
|
696
|
-
*/
|
|
697
|
-
react(emoji: string): Promise<boolean>;
|
|
698
|
-
/**
|
|
699
|
-
* @description Responde con un mensaje de texto.
|
|
700
|
-
* Replies with a text message.
|
|
701
|
-
*/
|
|
702
|
-
text(content: string): Promise</*elided*/ any | null>;
|
|
703
|
-
/**
|
|
704
|
-
* @description Responde con una imagen.
|
|
705
|
-
* Replies with an image.
|
|
706
|
-
*/
|
|
707
|
-
image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
708
|
-
/**
|
|
709
|
-
* @description Responde con un video.
|
|
710
|
-
* Replies with a video.
|
|
711
|
-
*/
|
|
712
|
-
video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
713
|
-
/**
|
|
714
|
-
* @description Responde con un audio.
|
|
715
|
-
* Replies with an audio.
|
|
716
|
-
*/
|
|
717
|
-
audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
|
|
718
|
-
/**
|
|
719
|
-
* @description Responde con una ubicacion.
|
|
720
|
-
* Replies with a location.
|
|
721
|
-
*/
|
|
722
|
-
location(opts: LocationOptions): Promise</*elided*/ any | null>;
|
|
723
|
-
/**
|
|
724
|
-
* @description Responde con una encuesta.
|
|
725
|
-
* Replies with a poll.
|
|
726
|
-
*/
|
|
727
|
-
poll(opts: PollOptions): Promise</*elided*/ any | null>;
|
|
728
|
-
/**
|
|
729
|
-
* @description Obtiene el contenido como Readable stream.
|
|
730
|
-
* Gets content as Readable stream.
|
|
731
|
-
*/
|
|
732
|
-
stream(): Promise<Readable>;
|
|
733
|
-
/**
|
|
734
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
735
|
-
* Gets message content as Buffer.
|
|
736
|
-
*/
|
|
737
|
-
content(): Promise<Buffer>;
|
|
738
|
-
/** Índice del mensaje / Message index */
|
|
739
|
-
readonly index: IMessageIndex;
|
|
740
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
741
|
-
readonly raw: WAMessage;
|
|
742
|
-
/** ID único del mensaje / Unique message ID */
|
|
743
|
-
get id(): string;
|
|
744
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
745
|
-
get cid(): string;
|
|
746
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
747
|
-
get mid(): string | null;
|
|
748
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
749
|
-
get me(): boolean;
|
|
750
|
-
/** Autor del mensaje / Message author */
|
|
751
|
-
get author(): string;
|
|
752
|
-
/** true si el mensaje fue editado / true if edited */
|
|
753
|
-
get edited(): boolean;
|
|
754
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
755
|
-
get type(): MessageType;
|
|
756
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
757
|
-
get caption(): string;
|
|
758
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
759
|
-
get mime(): string;
|
|
760
|
-
/** Estado del mensaje / Message status */
|
|
761
|
-
get status(): MESSAGE_STATUS;
|
|
762
|
-
/** true si el mensaje está destacado / true if starred */
|
|
763
|
-
get starred(): boolean;
|
|
764
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
765
|
-
get forwarded(): boolean;
|
|
766
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
767
|
-
get created_at(): number;
|
|
768
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
769
|
-
get deleted_at(): number | null;
|
|
770
|
-
} | null>;
|
|
771
|
-
/**
|
|
772
|
-
* @description Envía una encuesta.
|
|
773
|
-
* Sends a poll.
|
|
774
|
-
*/
|
|
775
|
-
poll(cid: string, opts: PollOptions, mid?: string): Promise<{
|
|
776
|
-
/**
|
|
777
|
-
* @description Edita el mensaje (solo texto o caption, solo mensajes propios).
|
|
778
|
-
* Edits the message (text or caption only, own messages only).
|
|
779
|
-
*/
|
|
780
|
-
edit(text: string): Promise<boolean>;
|
|
781
|
-
/**
|
|
782
|
-
* @description Elimina el mensaje para todos.
|
|
783
|
-
* Deletes the message for everyone.
|
|
784
|
-
*/
|
|
785
|
-
remove(): Promise<boolean>;
|
|
786
|
-
/**
|
|
787
|
-
* @description Reenvía el mensaje a otro chat.
|
|
788
|
-
* Forwards the message to another chat.
|
|
789
|
-
*/
|
|
790
|
-
forward(to_cid: string): Promise<boolean>;
|
|
791
|
-
/**
|
|
792
|
-
* @description Reacciona al mensaje.
|
|
793
|
-
* Reacts to the message.
|
|
794
|
-
* @param emoji Emoji de reacción (vacío para quitar) / Reaction emoji (empty to remove).
|
|
795
|
-
*/
|
|
796
|
-
react(emoji: string): Promise<boolean>;
|
|
797
|
-
/**
|
|
798
|
-
* @description Responde con un mensaje de texto.
|
|
799
|
-
* Replies with a text message.
|
|
800
|
-
*/
|
|
801
|
-
text(content: string): Promise</*elided*/ any | null>;
|
|
802
|
-
/**
|
|
803
|
-
* @description Responde con una imagen.
|
|
804
|
-
* Replies with an image.
|
|
805
|
-
*/
|
|
806
|
-
image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
807
|
-
/**
|
|
808
|
-
* @description Responde con un video.
|
|
809
|
-
* Replies with a video.
|
|
810
|
-
*/
|
|
811
|
-
video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
|
|
812
|
-
/**
|
|
813
|
-
* @description Responde con un audio.
|
|
814
|
-
* Replies with an audio.
|
|
815
|
-
*/
|
|
816
|
-
audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
|
|
817
|
-
/**
|
|
818
|
-
* @description Responde con una ubicacion.
|
|
819
|
-
* Replies with a location.
|
|
820
|
-
*/
|
|
821
|
-
location(opts: LocationOptions): Promise</*elided*/ any | null>;
|
|
822
|
-
/**
|
|
823
|
-
* @description Responde con una encuesta.
|
|
824
|
-
* Replies with a poll.
|
|
825
|
-
*/
|
|
826
|
-
poll(opts: PollOptions): Promise</*elided*/ any | null>;
|
|
827
|
-
/**
|
|
828
|
-
* @description Obtiene el contenido como Readable stream.
|
|
829
|
-
* Gets content as Readable stream.
|
|
830
|
-
*/
|
|
831
|
-
stream(): Promise<Readable>;
|
|
832
|
-
/**
|
|
833
|
-
* @description Obtiene el contenido del mensaje como Buffer.
|
|
834
|
-
* Gets message content as Buffer.
|
|
835
|
-
*/
|
|
836
|
-
content(): Promise<Buffer>;
|
|
837
|
-
/** Índice del mensaje / Message index */
|
|
838
|
-
readonly index: IMessageIndex;
|
|
839
|
-
/** WAMessage raw del protocolo / Protocol raw WAMessage */
|
|
840
|
-
readonly raw: WAMessage;
|
|
841
|
-
/** ID único del mensaje / Unique message ID */
|
|
842
|
-
get id(): string;
|
|
843
|
-
/** JID del chat al que pertenece / Chat JID */
|
|
844
|
-
get cid(): string;
|
|
845
|
-
/** ID del mensaje padre (reply) / Parent message ID (reply) */
|
|
846
|
-
get mid(): string | null;
|
|
847
|
-
/** true si el mensaje fue enviado por el usuario autenticado / true if sent by authenticated user */
|
|
848
|
-
get me(): boolean;
|
|
849
|
-
/** Autor del mensaje / Message author */
|
|
850
|
-
get author(): string;
|
|
851
|
-
/** true si el mensaje fue editado / true if edited */
|
|
852
|
-
get edited(): boolean;
|
|
853
|
-
/** Tipo de contenido del mensaje / Message content type */
|
|
854
|
-
get type(): MessageType;
|
|
855
|
-
/** Texto o caption del mensaje / Message text or caption */
|
|
856
|
-
get caption(): string;
|
|
857
|
-
/** Tipo MIME del contenido / Content MIME type */
|
|
858
|
-
get mime(): string;
|
|
859
|
-
/** Estado del mensaje / Message status */
|
|
860
|
-
get status(): MESSAGE_STATUS;
|
|
861
|
-
/** true si el mensaje está destacado / true if starred */
|
|
862
|
-
get starred(): boolean;
|
|
863
|
-
/** true si el mensaje fue reenviado / true if forwarded */
|
|
864
|
-
get forwarded(): boolean;
|
|
865
|
-
/** Timestamp de creación (ms) / Creation timestamp (ms) */
|
|
866
|
-
get created_at(): number;
|
|
867
|
-
/** Timestamp de expiración (ms) o null / Expiration timestamp (ms) or null */
|
|
868
|
-
get deleted_at(): number | null;
|
|
869
|
-
} | null>;
|
|
870
|
-
/**
|
|
871
|
-
* @description Edita un mensaje por CID y MID.
|
|
872
|
-
* Edits a message by CID and MID.
|
|
873
|
-
*/
|
|
874
|
-
edit(cid: string, mid: string, text: string): Promise<boolean>;
|
|
875
|
-
/**
|
|
876
|
-
* @description Elimina un mensaje por CID y MID.
|
|
877
|
-
* Deletes a message by CID and MID.
|
|
878
|
-
*/
|
|
879
|
-
remove(cid: string, mid: string): Promise<boolean>;
|
|
880
|
-
/**
|
|
881
|
-
* @description Reacciona a un mensaje por CID y MID.
|
|
882
|
-
* Reacts to a message by CID and MID.
|
|
883
|
-
*/
|
|
884
|
-
react(cid: string, mid: string, emoji: string): Promise<boolean>;
|
|
885
|
-
/**
|
|
886
|
-
* @description Reenvía un mensaje por CID y MID a otro chat.
|
|
887
|
-
* Forwards a message by CID and MID to another chat.
|
|
888
|
-
*/
|
|
889
|
-
forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
|
|
890
|
-
/**
|
|
891
|
-
* @description Observa cambios en un mensaje específico.
|
|
892
|
-
* Watches changes on a specific message.
|
|
893
|
-
* @returns Función para dejar de observar / Unsubscribe function.
|
|
894
|
-
*/
|
|
895
|
-
watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
|
|
896
|
-
} & {
|
|
897
|
-
_add_to_index: (cid: string, mid: string, timestamp: number) => Promise<void>;
|
|
898
|
-
_remove_from_index: (cid: string, mid: string) => Promise<void>;
|
|
899
|
-
_notify: (cid: string, mid: string) => void;
|
|
900
|
-
_build_index: typeof build_message_index;
|
|
901
|
-
};
|
|
902
|
-
export {};
|