diff --git a/index.d.ts b/index.d.ts index 81824c3..ce4c1ad 100644 --- a/index.d.ts +++ b/index.d.ts @@ -465,6 +465,8 @@ declare namespace WAWebJS { isForwarded: boolean, /** Location information contained in the message, if the message is type "location" */ location: Location, + /** List of vCards contained in the message */ + vCards: string[], /** MediaKey that represents the sticker 'ID' */ mediaKey?: string, /** Indicates the mentions in the message body. */ diff --git a/src/structures/Message.js b/src/structures/Message.js index f30f98e..5e259a0 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -118,10 +118,10 @@ class Message extends Base { this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined; /** - * List of vcards contained in the message, if the message is a vcard or multiple vcards. + * List of vCards contained in the message. * @type {Array} */ - this.vcards = data.type === MessageTypes.CONTACT_CARD_MULTI ? data.vcardList.map((c) => c.vcard) : data.type === MessageTypes.CONTACT_CARD ? [data.body] : []; + this.vCards = data.type === MessageTypes.CONTACT_CARD_MULTI ? data.vcardList.map((c) => c.vcard) : data.type === MessageTypes.CONTACT_CARD ? [data.body] : []; /** * Indicates the mentions in the message body.