From 2a58cfe8e268a1265f93cc617cde6246b8da0afc Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Mon, 17 Aug 2020 22:28:19 -0400 Subject: [PATCH] fix(types): properly set optional arguments when sending / replying to messages close #309 --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 4698c0c..260f8e5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -70,7 +70,7 @@ declare namespace WAWebJS { resetState(): Promise /** Send a message to a specific chatId */ - sendMessage(chatId: string, content: MessageContent, options: MessageSendOptions): Promise + sendMessage(chatId: string, content: MessageContent, options?: MessageSendOptions): Promise /** Marks the client as online */ sendPresenceAvailable(): Promise @@ -302,7 +302,7 @@ declare namespace WAWebJS { /** Returns the Contacts affected by this GroupNotification */ getRecipients: () => Promise, /** Sends a message to the same chat this GroupNotification was produced in */ - reply: (content: MessageContent, options: MessageSendOptions) => Promise, + reply: (content: MessageContent, options?: MessageSendOptions) => Promise, } @@ -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, + reply: (content: MessageContent, chatId?: string, options?: MessageSendOptions) => Promise, } /** ID that represents a message */