parent
a91bf1c762
commit
8e8d0c9b3e
6 changed files with 138 additions and 3 deletions
27
index.d.ts
vendored
27
index.d.ts
vendored
|
|
@ -242,6 +242,16 @@ declare namespace WAWebJS {
|
|||
ack: MessageAck
|
||||
) => void): this
|
||||
|
||||
/** Emitted when an ack event occurrs on message type */
|
||||
on(event: 'message_edit', listener: (
|
||||
/** The message that was affected */
|
||||
message: Message,
|
||||
/** New text message */
|
||||
newBody: String,
|
||||
/** Prev text message */
|
||||
prevBody: String
|
||||
) => void): this
|
||||
|
||||
/** Emitted when a chat unread count changes */
|
||||
on(event: 'unread_count', listener: (
|
||||
/** The chat that was affected */
|
||||
|
|
@ -567,6 +577,7 @@ declare namespace WAWebJS {
|
|||
MESSAGE_REVOKED_EVERYONE = 'message_revoke_everyone',
|
||||
MESSAGE_REVOKED_ME = 'message_revoke_me',
|
||||
MESSAGE_ACK = 'message_ack',
|
||||
MESSAGE_EDIT = 'message_edit',
|
||||
MEDIA_UPLOADED = 'media_uploaded',
|
||||
CONTACT_CHANGED = 'contact_changed',
|
||||
GROUP_JOIN = 'group_join',
|
||||
|
|
@ -789,6 +800,10 @@ declare namespace WAWebJS {
|
|||
businessOwnerJid?: string,
|
||||
/** Product JID */
|
||||
productId?: string,
|
||||
/** Last edit time */
|
||||
latestEditSenderTimestampMs?: number,
|
||||
/** Last edit message author */
|
||||
latestEditMsgKey?: MessageId,
|
||||
/** Message buttons */
|
||||
dynamicReplyButtons?: object,
|
||||
/** Selected button ID */
|
||||
|
|
@ -846,6 +861,8 @@ declare namespace WAWebJS {
|
|||
* Gets the reactions associated with the given message
|
||||
*/
|
||||
getReactions: () => Promise<ReactionList[]>,
|
||||
/** Edits the current message */
|
||||
edit: (content: MessageContent, options?: MessageEditOptions) => Promise<Message | null>,
|
||||
}
|
||||
|
||||
/** ID that represents a message */
|
||||
|
|
@ -911,6 +928,16 @@ declare namespace WAWebJS {
|
|||
stickerCategories?: string[]
|
||||
}
|
||||
|
||||
/** Options for editing a message */
|
||||
export interface MessageEditOptions {
|
||||
/** Show links preview. Has no effect on multi-device accounts. */
|
||||
linkPreview?: boolean
|
||||
/** Contacts that are being mentioned in the message */
|
||||
mentions?: Contact[]
|
||||
/** Extra options */
|
||||
extra?: any
|
||||
}
|
||||
|
||||
export interface MediaFromURLOptions {
|
||||
client?: Client
|
||||
filename?: string
|
||||
|
|
|
|||
Loading…
Reference in a new issue