mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +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>
|
||||
|
||||
/** 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 */
|
||||
sendPresenceAvailable(): Promise<void>
|
||||
@@ -302,7 +302,7 @@ declare namespace WAWebJS {
|
||||
/** Returns the Contacts affected by this GroupNotification */
|
||||
getRecipients: () => Promise<Contact[]>,
|
||||
/** 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 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 */
|
||||
|
||||
Reference in New Issue
Block a user