mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 04:29:15 +00:00
fix(types): properly set optional arguments when sending / replying to messages
close #309
This commit is contained in:
6
index.d.ts
vendored
6
index.d.ts
vendored
@@ -70,7 +70,7 @@ declare namespace WAWebJS {
|
|||||||
resetState(): Promise<void>
|
resetState(): Promise<void>
|
||||||
|
|
||||||
/** Send a message to a specific chatId */
|
/** Send a message to a specific chatId */
|
||||||
sendMessage(chatId: string, content: MessageContent, options: MessageSendOptions): Promise<Message>
|
sendMessage(chatId: string, content: MessageContent, options?: MessageSendOptions): Promise<Message>
|
||||||
|
|
||||||
/** Marks the client as online */
|
/** Marks the client as online */
|
||||||
sendPresenceAvailable(): Promise<void>
|
sendPresenceAvailable(): Promise<void>
|
||||||
@@ -302,7 +302,7 @@ declare namespace WAWebJS {
|
|||||||
/** Returns the Contacts affected by this GroupNotification */
|
/** Returns the Contacts affected by this GroupNotification */
|
||||||
getRecipients: () => Promise<Contact[]>,
|
getRecipients: () => Promise<Contact[]>,
|
||||||
/** Sends a message to the same chat this GroupNotification was produced in */
|
/** Sends a message to the same chat this GroupNotification was produced in */
|
||||||
reply: (content: MessageContent, options: MessageSendOptions) => Promise<Message>,
|
reply: (content: MessageContent, options?: MessageSendOptions) => Promise<Message>,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ declare namespace WAWebJS {
|
|||||||
* If chatId is specified, it will be sent through the specified Chat.
|
* If chatId is specified, it will be sent through the specified Chat.
|
||||||
* If not, it will send the message in the same Chat as the original message was sent.
|
* If not, it will send the message in the same Chat as the original message was sent.
|
||||||
*/
|
*/
|
||||||
reply: (content: MessageContent, chatId: string, options: MessageSendOptions) => Promise<Message>,
|
reply: (content: MessageContent, chatId?: string, options?: MessageSendOptions) => Promise<Message>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ID that represents a message */
|
/** ID that represents a message */
|
||||||
|
|||||||
Reference in New Issue
Block a user