@nuiisweety/baileys 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +965 -0
- package/README.md.bak +1376 -0
- package/WAProto/GenerateStatics.sh +3 -0
- package/WAProto/WAProto.proto +5479 -0
- package/WAProto/fix-imports.js +85 -0
- package/WAProto/index.d.ts +14017 -0
- package/WAProto/index.js +97691 -0
- package/engine-requirements.js +10 -0
- package/lib/Defaults/index.d.ts +75 -0
- package/lib/Defaults/index.d.ts.map +1 -0
- package/lib/Defaults/index.js +137 -0
- package/lib/Defaults/index.js.map +1 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
- package/lib/Signal/Group/ciphertext-message.d.ts.map +1 -0
- package/lib/Signal/Group/ciphertext-message.js +12 -0
- package/lib/Signal/Group/ciphertext-message.js.map +1 -0
- package/lib/Signal/Group/group-session-builder.d.ts +15 -0
- package/lib/Signal/Group/group-session-builder.d.ts.map +1 -0
- package/lib/Signal/Group/group-session-builder.js +30 -0
- package/lib/Signal/Group/group-session-builder.js.map +1 -0
- package/lib/Signal/Group/group_cipher.d.ts +17 -0
- package/lib/Signal/Group/group_cipher.d.ts.map +1 -0
- package/lib/Signal/Group/group_cipher.js +82 -0
- package/lib/Signal/Group/group_cipher.js.map +1 -0
- package/lib/Signal/Group/index.d.ts +12 -0
- package/lib/Signal/Group/index.d.ts.map +1 -0
- package/lib/Signal/Group/index.js +12 -0
- package/lib/Signal/Group/index.js.map +1 -0
- package/lib/Signal/Group/keyhelper.d.ts +11 -0
- package/lib/Signal/Group/keyhelper.d.ts.map +1 -0
- package/lib/Signal/Group/keyhelper.js +18 -0
- package/lib/Signal/Group/keyhelper.js.map +1 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
- package/lib/Signal/Group/sender-chain-key.d.ts.map +1 -0
- package/lib/Signal/Group/sender-chain-key.js +26 -0
- package/lib/Signal/Group/sender-chain-key.js.map +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
- package/lib/Signal/Group/sender-key-distribution-message.js.map +1 -0
- package/lib/Signal/Group/sender-key-message.d.ts +19 -0
- package/lib/Signal/Group/sender-key-message.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-message.js +66 -0
- package/lib/Signal/Group/sender-key-message.js.map +1 -0
- package/lib/Signal/Group/sender-key-name.d.ts +18 -0
- package/lib/Signal/Group/sender-key-name.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-name.js +48 -0
- package/lib/Signal/Group/sender-key-name.js.map +1 -0
- package/lib/Signal/Group/sender-key-record.d.ts +31 -0
- package/lib/Signal/Group/sender-key-record.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-record.js +41 -0
- package/lib/Signal/Group/sender-key-record.js.map +1 -0
- package/lib/Signal/Group/sender-key-state.d.ts +39 -0
- package/lib/Signal/Group/sender-key-state.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-state.js +84 -0
- package/lib/Signal/Group/sender-key-state.js.map +1 -0
- package/lib/Signal/Group/sender-message-key.d.ts +12 -0
- package/lib/Signal/Group/sender-message-key.d.ts.map +1 -0
- package/lib/Signal/Group/sender-message-key.js +26 -0
- package/lib/Signal/Group/sender-message-key.js.map +1 -0
- package/lib/Signal/libsignal.d.ts +5 -0
- package/lib/Signal/libsignal.d.ts.map +1 -0
- package/lib/Signal/libsignal.js +431 -0
- package/lib/Signal/libsignal.js.map +1 -0
- package/lib/Signal/lid-mapping.d.ts +23 -0
- package/lib/Signal/lid-mapping.d.ts.map +1 -0
- package/lib/Signal/lid-mapping.js +277 -0
- package/lib/Signal/lid-mapping.js.map +1 -0
- package/lib/Socket/Client/index.d.ts +3 -0
- package/lib/Socket/Client/index.d.ts.map +1 -0
- package/lib/Socket/Client/index.js +3 -0
- package/lib/Socket/Client/index.js.map +1 -0
- package/lib/Socket/Client/types.d.ts +16 -0
- package/lib/Socket/Client/types.d.ts.map +1 -0
- package/lib/Socket/Client/types.js +11 -0
- package/lib/Socket/Client/types.js.map +1 -0
- package/lib/Socket/Client/websocket.d.ts +13 -0
- package/lib/Socket/Client/websocket.d.ts.map +1 -0
- package/lib/Socket/Client/websocket.js +54 -0
- package/lib/Socket/Client/websocket.js.map +1 -0
- package/lib/Socket/business.d.ts +217 -0
- package/lib/Socket/business.d.ts.map +1 -0
- package/lib/Socket/business.js +379 -0
- package/lib/Socket/business.js.map +1 -0
- package/lib/Socket/chats.d.ts +124 -0
- package/lib/Socket/chats.d.ts.map +1 -0
- package/lib/Socket/chats.js +1193 -0
- package/lib/Socket/chats.js.map +1 -0
- package/lib/Socket/communities.d.ts +273 -0
- package/lib/Socket/communities.d.ts.map +1 -0
- package/lib/Socket/communities.js +431 -0
- package/lib/Socket/communities.js.map +1 -0
- package/lib/Socket/dugong.js +204 -0
- package/lib/Socket/groups.d.ts +161 -0
- package/lib/Socket/groups.d.ts.map +1 -0
- package/lib/Socket/groups.js +347 -0
- package/lib/Socket/groups.js.map +1 -0
- package/lib/Socket/index.d.ts +260 -0
- package/lib/Socket/index.d.ts.map +1 -0
- package/lib/Socket/index.js +52 -0
- package/lib/Socket/index.js.bak +52 -0
- package/lib/Socket/index.js.map +1 -0
- package/lib/Socket/messages-recv.d.ts +203 -0
- package/lib/Socket/messages-recv.d.ts.map +1 -0
- package/lib/Socket/messages-recv.js +1772 -0
- package/lib/Socket/messages-recv.js.map +1 -0
- package/lib/Socket/messages-send.d.ts +199 -0
- package/lib/Socket/messages-send.d.ts.map +1 -0
- package/lib/Socket/messages-send.js +1334 -0
- package/lib/Socket/messages-send.js.map +1 -0
- package/lib/Socket/mex.d.ts +3 -0
- package/lib/Socket/mex.d.ts.map +1 -0
- package/lib/Socket/mex.js +42 -0
- package/lib/Socket/mex.js.map +1 -0
- package/lib/Socket/newsletter.d.ts +170 -0
- package/lib/Socket/newsletter.d.ts.map +1 -0
- package/lib/Socket/newsletter.js +181 -0
- package/lib/Socket/newsletter.js.map +1 -0
- package/lib/Socket/socket.d.ts +59 -0
- package/lib/Socket/socket.d.ts.map +1 -0
- package/lib/Socket/socket.js +967 -0
- package/lib/Socket/socket.js.map +1 -0
- package/lib/Store/index.d.ts +4 -0
- package/lib/Store/index.d.ts.map +1 -0
- package/lib/Store/index.js +4 -0
- package/lib/Store/index.js.map +1 -0
- package/lib/Store/make-in-memory-store.d.ts +63 -0
- package/lib/Store/make-in-memory-store.d.ts.map +1 -0
- package/lib/Store/make-in-memory-store.js +415 -0
- package/lib/Store/make-in-memory-store.js.map +1 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.d.ts.map +1 -0
- package/lib/Store/make-ordered-dictionary.js +79 -0
- package/lib/Store/make-ordered-dictionary.js.map +1 -0
- package/lib/Store/object-repository.d.ts +11 -0
- package/lib/Store/object-repository.d.ts.map +1 -0
- package/lib/Store/object-repository.js +24 -0
- package/lib/Store/object-repository.js.map +1 -0
- package/lib/Types/Auth.d.ts +117 -0
- package/lib/Types/Auth.d.ts.map +1 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Auth.js.map +1 -0
- package/lib/Types/Bussines.d.ts +25 -0
- package/lib/Types/Bussines.d.ts.map +1 -0
- package/lib/Types/Bussines.js +2 -0
- package/lib/Types/Bussines.js.map +1 -0
- package/lib/Types/Call.d.ts +15 -0
- package/lib/Types/Call.d.ts.map +1 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Call.js.map +1 -0
- package/lib/Types/Chat.d.ts +124 -0
- package/lib/Types/Chat.d.ts.map +1 -0
- package/lib/Types/Chat.js +8 -0
- package/lib/Types/Chat.js.map +1 -0
- package/lib/Types/Contact.d.ts +26 -0
- package/lib/Types/Contact.d.ts.map +1 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Contact.js.map +1 -0
- package/lib/Types/Events.d.ts +256 -0
- package/lib/Types/Events.d.ts.map +1 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/Events.js.map +1 -0
- package/lib/Types/GroupMetadata.d.ts +71 -0
- package/lib/Types/GroupMetadata.d.ts.map +1 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/GroupMetadata.js.map +1 -0
- package/lib/Types/Label.d.ts +47 -0
- package/lib/Types/Label.d.ts.map +1 -0
- package/lib/Types/Label.js +25 -0
- package/lib/Types/Label.js.map +1 -0
- package/lib/Types/LabelAssociation.d.ts +30 -0
- package/lib/Types/LabelAssociation.d.ts.map +1 -0
- package/lib/Types/LabelAssociation.js +7 -0
- package/lib/Types/LabelAssociation.js.map +1 -0
- package/lib/Types/Message.d.ts +320 -0
- package/lib/Types/Message.d.ts.map +1 -0
- package/lib/Types/Message.js +17 -0
- package/lib/Types/Message.js.map +1 -0
- package/lib/Types/Mex.d.ts +141 -0
- package/lib/Types/Mex.d.ts.map +1 -0
- package/lib/Types/Mex.js +37 -0
- package/lib/Types/Mex.js.map +1 -0
- package/lib/Types/Product.d.ts +79 -0
- package/lib/Types/Product.d.ts.map +1 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Product.js.map +1 -0
- package/lib/Types/RichType.d.ts +3 -0
- package/lib/Types/RichType.d.ts.map +1 -0
- package/lib/Types/RichType.js +23 -0
- package/lib/Types/RichType.js.map +1 -0
- package/lib/Types/Signal.d.ts +87 -0
- package/lib/Types/Signal.d.ts.map +1 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Signal.js.map +1 -0
- package/lib/Types/Socket.d.ts +136 -0
- package/lib/Types/Socket.d.ts.map +1 -0
- package/lib/Types/Socket.js +3 -0
- package/lib/Types/Socket.js.map +1 -0
- package/lib/Types/State.d.ts +97 -0
- package/lib/Types/State.d.ts.map +1 -0
- package/lib/Types/State.js +56 -0
- package/lib/Types/State.js.map +1 -0
- package/lib/Types/USync.d.ts +26 -0
- package/lib/Types/USync.d.ts.map +1 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/USync.js.map +1 -0
- package/lib/Types/index.d.ts +65 -0
- package/lib/Types/index.d.ts.map +1 -0
- package/lib/Types/index.js +26 -0
- package/lib/Types/index.js.map +1 -0
- package/lib/Utils/auth-utils.d.ts +24 -0
- package/lib/Utils/auth-utils.d.ts.map +1 -0
- package/lib/Utils/auth-utils.js +302 -0
- package/lib/Utils/auth-utils.js.map +1 -0
- package/lib/Utils/browser-utils.d.ts +4 -0
- package/lib/Utils/browser-utils.d.ts.map +1 -0
- package/lib/Utils/browser-utils.js +28 -0
- package/lib/Utils/browser-utils.js.map +1 -0
- package/lib/Utils/business.d.ts +23 -0
- package/lib/Utils/business.d.ts.map +1 -0
- package/lib/Utils/business.js +231 -0
- package/lib/Utils/business.js.map +1 -0
- package/lib/Utils/chat-utils.d.ts +100 -0
- package/lib/Utils/chat-utils.d.ts.map +1 -0
- package/lib/Utils/chat-utils.js +872 -0
- package/lib/Utils/chat-utils.js.map +1 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
- package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
- package/lib/Utils/companion-reg-client-utils.js +35 -0
- package/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/lib/Utils/crypto.d.ts +37 -0
- package/lib/Utils/crypto.d.ts.map +1 -0
- package/lib/Utils/crypto.js +118 -0
- package/lib/Utils/crypto.js.map +1 -0
- package/lib/Utils/decode-wa-message.d.ts +66 -0
- package/lib/Utils/decode-wa-message.d.ts.map +1 -0
- package/lib/Utils/decode-wa-message.js +311 -0
- package/lib/Utils/decode-wa-message.js.map +1 -0
- package/lib/Utils/event-buffer.d.ts +36 -0
- package/lib/Utils/event-buffer.d.ts.map +1 -0
- package/lib/Utils/event-buffer.js +622 -0
- package/lib/Utils/event-buffer.js.map +1 -0
- package/lib/Utils/generics.d.ts +91 -0
- package/lib/Utils/generics.d.ts.map +1 -0
- package/lib/Utils/generics.js +393 -0
- package/lib/Utils/generics.js.map +1 -0
- package/lib/Utils/history.d.ts +24 -0
- package/lib/Utils/history.d.ts.map +1 -0
- package/lib/Utils/history.js +134 -0
- package/lib/Utils/history.js.map +1 -0
- package/lib/Utils/identity-change-handler.d.ts +44 -0
- package/lib/Utils/identity-change-handler.d.ts.map +1 -0
- package/lib/Utils/identity-change-handler.js +50 -0
- package/lib/Utils/identity-change-handler.js.map +1 -0
- package/lib/Utils/index.d.ts +24 -0
- package/lib/Utils/index.d.ts.map +1 -0
- package/lib/Utils/index.js +24 -0
- package/lib/Utils/index.js.map +1 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.d.ts.map +1 -0
- package/lib/Utils/link-preview.js +85 -0
- package/lib/Utils/link-preview.js.map +1 -0
- package/lib/Utils/logger.d.ts +12 -0
- package/lib/Utils/logger.d.ts.map +1 -0
- package/lib/Utils/logger.js +3 -0
- package/lib/Utils/logger.js.map +1 -0
- package/lib/Utils/lt-hash.d.ts +8 -0
- package/lib/Utils/lt-hash.d.ts.map +1 -0
- package/lib/Utils/lt-hash.js +8 -0
- package/lib/Utils/lt-hash.js.map +1 -0
- package/lib/Utils/make-mutex.d.ts +9 -0
- package/lib/Utils/make-mutex.d.ts.map +1 -0
- package/lib/Utils/make-mutex.js +33 -0
- package/lib/Utils/make-mutex.js.map +1 -0
- package/lib/Utils/message-retry-manager.d.ts +115 -0
- package/lib/Utils/message-retry-manager.d.ts.map +1 -0
- package/lib/Utils/message-retry-manager.js +265 -0
- package/lib/Utils/message-retry-manager.js.map +1 -0
- package/lib/Utils/messages-media.d.ts +133 -0
- package/lib/Utils/messages-media.d.ts.map +1 -0
- package/lib/Utils/messages-media.js +786 -0
- package/lib/Utils/messages-media.js.map +1 -0
- package/lib/Utils/messages.d.ts +91 -0
- package/lib/Utils/messages.d.ts.map +1 -0
- package/lib/Utils/messages.js +1762 -0
- package/lib/Utils/messages.js.bak +1183 -0
- package/lib/Utils/messages.js.bak2 +893 -0
- package/lib/Utils/messages.js.bak3 +1183 -0
- package/lib/Utils/messages.js.map +1 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/noise-handler.d.ts.map +1 -0
- package/lib/Utils/noise-handler.js +201 -0
- package/lib/Utils/noise-handler.js.map +1 -0
- package/lib/Utils/offline-node-processor.d.ts +17 -0
- package/lib/Utils/offline-node-processor.d.ts.map +1 -0
- package/lib/Utils/offline-node-processor.js +40 -0
- package/lib/Utils/offline-node-processor.js.map +1 -0
- package/lib/Utils/pre-key-manager.d.ts +28 -0
- package/lib/Utils/pre-key-manager.d.ts.map +1 -0
- package/lib/Utils/pre-key-manager.js +106 -0
- package/lib/Utils/pre-key-manager.js.map +1 -0
- package/lib/Utils/process-message.d.ts +60 -0
- package/lib/Utils/process-message.d.ts.map +1 -0
- package/lib/Utils/process-message.js +597 -0
- package/lib/Utils/process-message.js.map +1 -0
- package/lib/Utils/reporting-utils.d.ts +11 -0
- package/lib/Utils/reporting-utils.d.ts.map +1 -0
- package/lib/Utils/reporting-utils.js +258 -0
- package/lib/Utils/reporting-utils.js.map +1 -0
- package/lib/Utils/rich-message-utils.d.ts +49 -0
- package/lib/Utils/rich-message-utils.d.ts.map +1 -0
- package/lib/Utils/rich-message-utils.js +246 -0
- package/lib/Utils/rich-message-utils.js.map +1 -0
- package/lib/Utils/signal.d.ts +47 -0
- package/lib/Utils/signal.d.ts.map +1 -0
- package/lib/Utils/signal.js +201 -0
- package/lib/Utils/signal.js.map +1 -0
- package/lib/Utils/stanza-ack.d.ts +11 -0
- package/lib/Utils/stanza-ack.d.ts.map +1 -0
- package/lib/Utils/stanza-ack.js +38 -0
- package/lib/Utils/stanza-ack.js.map +1 -0
- package/lib/Utils/sync-action-utils.d.ts +19 -0
- package/lib/Utils/sync-action-utils.d.ts.map +1 -0
- package/lib/Utils/sync-action-utils.js +49 -0
- package/lib/Utils/sync-action-utils.js.map +1 -0
- package/lib/Utils/tc-token-utils.d.ts +37 -0
- package/lib/Utils/tc-token-utils.d.ts.map +1 -0
- package/lib/Utils/tc-token-utils.js +163 -0
- package/lib/Utils/tc-token-utils.js.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.js +121 -0
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +11 -0
- package/lib/Utils/use-single-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-single-file-auth-state.js +106 -0
- package/lib/Utils/use-single-file-auth-state.js.map +1 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-sqlite-auth-state.js +109 -0
- package/lib/Utils/use-sqlite-auth-state.js.map +1 -0
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/lib/Utils/validate-connection.d.ts.map +1 -0
- package/lib/Utils/validate-connection.js +203 -0
- package/lib/Utils/validate-connection.js.map +1 -0
- package/lib/WABinary/constants.d.ts +28 -0
- package/lib/WABinary/constants.d.ts.map +1 -0
- package/lib/WABinary/constants.js +1373 -0
- package/lib/WABinary/constants.js.map +1 -0
- package/lib/WABinary/decode.d.ts +7 -0
- package/lib/WABinary/decode.d.ts.map +1 -0
- package/lib/WABinary/decode.js +262 -0
- package/lib/WABinary/decode.js.map +1 -0
- package/lib/WABinary/encode.d.ts +3 -0
- package/lib/WABinary/encode.d.ts.map +1 -0
- package/lib/WABinary/encode.js +220 -0
- package/lib/WABinary/encode.js.map +1 -0
- package/lib/WABinary/generic-utils.d.ts +15 -0
- package/lib/WABinary/generic-utils.d.ts.map +1 -0
- package/lib/WABinary/generic-utils.js +214 -0
- package/lib/WABinary/generic-utils.js.map +1 -0
- package/lib/WABinary/index.d.ts +6 -0
- package/lib/WABinary/index.d.ts.map +1 -0
- package/lib/WABinary/index.js +6 -0
- package/lib/WABinary/index.js.map +1 -0
- package/lib/WABinary/jid-utils.d.ts +48 -0
- package/lib/WABinary/jid-utils.d.ts.map +1 -0
- package/lib/WABinary/jid-utils.js +96 -0
- package/lib/WABinary/jid-utils.js.map +1 -0
- package/lib/WABinary/types.d.ts +19 -0
- package/lib/WABinary/types.d.ts.map +1 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WABinary/types.js.map +1 -0
- package/lib/WAM/BinaryInfo.d.ts +9 -0
- package/lib/WAM/BinaryInfo.d.ts.map +1 -0
- package/lib/WAM/BinaryInfo.js +10 -0
- package/lib/WAM/BinaryInfo.js.map +1 -0
- package/lib/WAM/constants.d.ts +40 -0
- package/lib/WAM/constants.d.ts.map +1 -0
- package/lib/WAM/constants.js +22853 -0
- package/lib/WAM/constants.js.map +1 -0
- package/lib/WAM/encode.d.ts +3 -0
- package/lib/WAM/encode.d.ts.map +1 -0
- package/lib/WAM/encode.js +150 -0
- package/lib/WAM/encode.js.map +1 -0
- package/lib/WAM/index.d.ts +4 -0
- package/lib/WAM/index.d.ts.map +1 -0
- package/lib/WAM/index.js +4 -0
- package/lib/WAM/index.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +52 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/index.d.ts +6 -0
- package/lib/WAUSync/Protocols/index.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/index.js +6 -0
- package/lib/WAUSync/Protocols/index.js.map +1 -0
- package/lib/WAUSync/USyncQuery.d.ts +30 -0
- package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
- package/lib/WAUSync/USyncQuery.js +98 -0
- package/lib/WAUSync/USyncQuery.js.map +1 -0
- package/lib/WAUSync/USyncUser.d.ts +17 -0
- package/lib/WAUSync/USyncUser.d.ts.map +1 -0
- package/lib/WAUSync/USyncUser.js +31 -0
- package/lib/WAUSync/USyncUser.js.map +1 -0
- package/lib/WAUSync/index.d.ts +4 -0
- package/lib/WAUSync/index.d.ts.map +1 -0
- package/lib/WAUSync/index.js +4 -0
- package/lib/WAUSync/index.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -0
- package/package.json +140 -0
package/README.md
ADDED
|
@@ -0,0 +1,965 @@
|
|
|
1
|
+
<h1 align="center">🌸 @nuiisweety/baileys 🌸</h1>
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/NuiiS4TORU/-nuisockets/refs/heads/main/nuiisweety.png" width="100%"/>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div align="center">
|
|
8
|
+
<i>✨ Fork manis dari <code>@whiskeysockets/baileys</code> v7.0.0-rc11 — dikembangkan dengan sepenuh hati oleh <b>NuiiS4TORU</b> 💖</i>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<br/>
|
|
12
|
+
|
|
13
|
+
<div align="center">
|
|
14
|
+
<blockquote>
|
|
15
|
+
🌷 <b>@nuiisweety/baileys hanya pernah bercabang dari satu sumber yang ia percaya, yaitu <a href="https://github.com/WhiskeySockets/Baileys">@whiskeysockets/baileys</a>.</b><br/>
|
|
16
|
+
Setiap modifikasi adalah buah dari pengembangan mandiri yang penuh dedikasi~ 🍀
|
|
17
|
+
</blockquote>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🗺️ Navigasi Sayang
|
|
23
|
+
|
|
24
|
+
<div align="center">
|
|
25
|
+
|
|
26
|
+
**🔌 Koneksi**
|
|
27
|
+
[QR Code](#-koneksi-qr-code) · [Pairing Code](#-koneksi-pairing-code) · [Browser Identity](#️-browser-identity) · [Opsi Koneksi](#️-opsi-koneksi)
|
|
28
|
+
|
|
29
|
+
**📨 Handle Pesan**
|
|
30
|
+
[Terima Pesan](#-terima-pesan) · [Handle Grup](#-handle-grup)
|
|
31
|
+
|
|
32
|
+
**💌 Kirim Pesan**
|
|
33
|
+
[Teks](#-teks) · [Gambar](#️-gambar) · [Video](#-video) · [Audio & Voice Note](#-audio--voice-note) · [Dokumen](#-dokumen) · [Sticker](#-sticker) · [Lokasi](#-lokasi) · [Kontak](#-kontak)
|
|
34
|
+
|
|
35
|
+
**💞 Interaksi**
|
|
36
|
+
[Reaksi](#-reaksi) · [Poll](#️-poll) · [Poll Result](#-poll-result) · [Poll Update](#️-poll-update) · [Forward](#️-forward) · [Hapus](#️-hapus-pesan) · [Edit](#️-edit-pesan) · [Pin](#-pin-pesan)
|
|
37
|
+
|
|
38
|
+
**🌺 Tambahan**
|
|
39
|
+
[Album](#️-album) · [Event](#-event) · [Group Status](#-group-status--group-story) · [Status Mention](#️-status-mention) · [Flow Reply](#-flow-reply) · [Button Reply](#-button-reply) · [Keep In Chat](#-keep-in-chat) · [Scheduled Call](#-scheduled-call) · [Group Invite](#-group-invite) · [Product](#️-product)
|
|
40
|
+
|
|
41
|
+
**🎀 Wrapper**
|
|
42
|
+
[View Once](#️-view-once) · [View Once V2](#️-view-once-v2) · [Ephemeral](#️-ephemeral) · [Spoiler](#-spoiler) · [Group Status Wrap](#-group-status-wrap) · [Lottie Sticker](#-lottie-sticker) · [AI Icon](#-ai-icon) · [Secure Meta Label](#️-secure-meta-service-label)
|
|
43
|
+
|
|
44
|
+
**✨ Interactive**
|
|
45
|
+
[Buttons](#-buttons) · [List Message](#-list-message) · [Template Buttons](#️-template-buttons) · [Native Flow](#-native-flow) · [Carousel](#-carousel)
|
|
46
|
+
|
|
47
|
+
**🌟 Rich Message (AI)**
|
|
48
|
+
[Code Block](#-code-block) · [Links](#-links-rich) · [Table](#-table-rich) · [Rich Response (Gabungan)](#-rich-response-gabungan)
|
|
49
|
+
|
|
50
|
+
**🍃 Lainnya**
|
|
51
|
+
[List Reply](#-list-reply) · [Sticker Pack](#-sticker-pack) · [External Ad Reply](#-external-ad-reply) · [Request Payment](#-request-payment) · [Invoice](#-invoice) · [Order](#-order) · [Disappearing Messages](#-disappearing-messages) · [Raw Message](#-raw-message)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 🌸 Instalasi
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
const { default: makeWASocket } = require('@nuiisweety/baileys')
|
|
61
|
+
// atau ESM 🌿
|
|
62
|
+
import makeWASocket from '@nuiisweety/baileys'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 🔌 Koneksi QR Code
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
const {
|
|
71
|
+
default: makeWASocket,
|
|
72
|
+
useMultiFileAuthState,
|
|
73
|
+
DisconnectReason,
|
|
74
|
+
fetchLatestBaileysVersion
|
|
75
|
+
} = require('@nuiisweety/baileys')
|
|
76
|
+
|
|
77
|
+
async function start() {
|
|
78
|
+
const { state, saveCreds } = await useMultiFileAuthState('auth_info')
|
|
79
|
+
const { version } = await fetchLatestBaileysVersion()
|
|
80
|
+
|
|
81
|
+
const sock = makeWASocket({
|
|
82
|
+
version,
|
|
83
|
+
auth: state,
|
|
84
|
+
printQRInTerminal: true
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
sock.ev.on('creds.update', saveCreds)
|
|
88
|
+
sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
|
|
89
|
+
if (connection === 'close') {
|
|
90
|
+
const code = lastDisconnect?.error?.output?.statusCode
|
|
91
|
+
if (code !== DisconnectReason.loggedOut) start()
|
|
92
|
+
} else if (connection === 'open') {
|
|
93
|
+
console.log('💖 Terhubung dengan indah!')
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
start()
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 🔑 Koneksi Pairing Code
|
|
103
|
+
|
|
104
|
+
> 🌷 Cocok untuk server/VPS tanpa tampilan terminal — tetap bisa terhubung dengan elegan~
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
const sock = makeWASocket({
|
|
108
|
+
version,
|
|
109
|
+
auth: state,
|
|
110
|
+
printQRInTerminal: false
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
sock.ev.on('creds.update', saveCreds)
|
|
114
|
+
sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
|
|
115
|
+
if (connection === 'close') {
|
|
116
|
+
if (lastDisconnect?.error?.output?.statusCode !== DisconnectReason.loggedOut) start()
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
// 💌 Nomor HP format internasional tanpa +
|
|
121
|
+
if (!sock.authState.creds.registered) {
|
|
122
|
+
const code = await sock.requestPairingCode('628123456789')
|
|
123
|
+
console.log('🌸 Pairing code:', code)
|
|
124
|
+
// Masukkan di WA → Perangkat Tertaut → Tautkan Perangkat
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
> 🍀 Pairing code kadaluarsa dalam beberapa menit. Jalankan ulang jika gagal ya~
|
|
129
|
+
|
|
130
|
+
**🎀 Custom pairing code (8 karakter):**
|
|
131
|
+
```js
|
|
132
|
+
const code = await sock.requestPairingCode('628123456789', 'ABCD1234')
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 🖥️ Browser Identity
|
|
138
|
+
|
|
139
|
+
```js
|
|
140
|
+
const { Browsers } = require('@nuiisweety/baileys')
|
|
141
|
+
|
|
142
|
+
makeWASocket({
|
|
143
|
+
browser: Browsers.macOS('Chrome'), // 🍎 Mac OS — Chrome
|
|
144
|
+
browser: Browsers.macOS('Firefox'), // 🦊 Mac OS — Firefox
|
|
145
|
+
browser: Browsers.windows('Chrome'), // 🪟 Windows — Chrome
|
|
146
|
+
browser: Browsers.ubuntu('Chrome'), // 🐧 Ubuntu — Chrome
|
|
147
|
+
browser: Browsers.baileys('Chrome'), // 🌸 Baileys — Chrome
|
|
148
|
+
browser: ['MyBot', 'Chrome', '1.0.0'] // ✨ custom
|
|
149
|
+
})
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## ⚙️ Opsi Koneksi
|
|
155
|
+
|
|
156
|
+
```js
|
|
157
|
+
makeWASocket({
|
|
158
|
+
version,
|
|
159
|
+
auth: state,
|
|
160
|
+
printQRInTerminal: true,
|
|
161
|
+
browser: Browsers.macOS('Chrome'),
|
|
162
|
+
connectTimeoutMs: 20000,
|
|
163
|
+
keepAliveIntervalMs: 30000,
|
|
164
|
+
markOnlineOnConnect: true,
|
|
165
|
+
syncFullHistory: false,
|
|
166
|
+
generateHighQualityLinkPreview: false,
|
|
167
|
+
emitOwnEvents: true,
|
|
168
|
+
getMessage: async key => store?.messages?.[key.remoteJid]?.get(key.id)?.message
|
|
169
|
+
})
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 📥 Terima Pesan
|
|
175
|
+
|
|
176
|
+
```js
|
|
177
|
+
sock.ev.on('messages.upsert', async ({ messages, type }) => {
|
|
178
|
+
if (type !== 'notify') return
|
|
179
|
+
|
|
180
|
+
for (const m of messages) {
|
|
181
|
+
if (!m.message) continue
|
|
182
|
+
if (m.key.fromMe) continue
|
|
183
|
+
|
|
184
|
+
const jid = m.key.remoteJid
|
|
185
|
+
const isGroup = jid.endsWith('@g.us')
|
|
186
|
+
const sender = isGroup ? m.key.participant : jid
|
|
187
|
+
|
|
188
|
+
// 💬 Ambil teks
|
|
189
|
+
const text =
|
|
190
|
+
m.message.conversation ||
|
|
191
|
+
m.message.extendedTextMessage?.text ||
|
|
192
|
+
m.message.imageMessage?.caption ||
|
|
193
|
+
m.message.videoMessage?.caption || ''
|
|
194
|
+
|
|
195
|
+
// 👀 Tandai dibaca
|
|
196
|
+
await sock.readMessages([m.key])
|
|
197
|
+
|
|
198
|
+
// 🌸 Typing indicator
|
|
199
|
+
await sock.sendPresenceUpdate('composing', jid)
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## 👥 Handle Grup
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
// 🌷 Anggota masuk/keluar
|
|
210
|
+
sock.ev.on('group-participants.update', ({ id, participants, action }) => {
|
|
211
|
+
// action: 'add' | 'remove' | 'promote' | 'demote'
|
|
212
|
+
})
|
|
213
|
+
|
|
214
|
+
// 📝 Info grup diupdate
|
|
215
|
+
sock.ev.on('groups.update', updates => {})
|
|
216
|
+
|
|
217
|
+
// 🔍 Metadata grup
|
|
218
|
+
const meta = await sock.groupMetadata(groupJid)
|
|
219
|
+
console.log(meta.subject, meta.participants)
|
|
220
|
+
|
|
221
|
+
// 🌸 Semua grup
|
|
222
|
+
const groups = await sock.groupFetchAllParticipating()
|
|
223
|
+
|
|
224
|
+
// 💞 Tambah / keluarkan / promote / demote
|
|
225
|
+
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'add')
|
|
226
|
+
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'remove')
|
|
227
|
+
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'promote')
|
|
228
|
+
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'demote')
|
|
229
|
+
|
|
230
|
+
// ✏️ Ubah nama / deskripsi
|
|
231
|
+
await sock.groupUpdateSubject(groupJid, 'Nama Baru')
|
|
232
|
+
await sock.groupUpdateDescription(groupJid, 'Deskripsi baru')
|
|
233
|
+
|
|
234
|
+
// 🔒 Kunci / buka grup
|
|
235
|
+
await sock.groupSettingUpdate(groupJid, 'announcement')
|
|
236
|
+
await sock.groupSettingUpdate(groupJid, 'not_announcement')
|
|
237
|
+
|
|
238
|
+
// 📣 Mention semua anggota
|
|
239
|
+
const meta2 = await sock.groupMetadata(groupJid)
|
|
240
|
+
const members = meta2.participants.map(p => p.id)
|
|
241
|
+
await sock.sendMessage(groupJid, {
|
|
242
|
+
text: members.map(m => `@${m.split('@')[0]}`).join(' '),
|
|
243
|
+
mentions: members
|
|
244
|
+
})
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## 💬 Teks
|
|
250
|
+
|
|
251
|
+
```js
|
|
252
|
+
await sock.sendMessage(jid, { text: 'Halo sayang~ 🌸' })
|
|
253
|
+
|
|
254
|
+
// 💌 Dengan mention
|
|
255
|
+
await sock.sendMessage(jid, {
|
|
256
|
+
text: '@628xxx halo!',
|
|
257
|
+
mentions: ['628xxx@s.whatsapp.net']
|
|
258
|
+
}, { quoted: m })
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## 🖼️ Gambar
|
|
264
|
+
|
|
265
|
+
```js
|
|
266
|
+
// 🌐 URL
|
|
267
|
+
await sock.sendMessage(jid, {
|
|
268
|
+
image: { url: 'https://example.com/image.jpg' },
|
|
269
|
+
caption: 'Keterangan 🌷'
|
|
270
|
+
})
|
|
271
|
+
|
|
272
|
+
// 📁 Buffer / file
|
|
273
|
+
await sock.sendMessage(jid, {
|
|
274
|
+
image: fs.readFileSync('image.jpg'),
|
|
275
|
+
caption: 'Keterangan 💖'
|
|
276
|
+
})
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## 🎥 Video
|
|
282
|
+
|
|
283
|
+
```js
|
|
284
|
+
await sock.sendMessage(jid, {
|
|
285
|
+
video: { url: 'https://example.com/video.mp4' },
|
|
286
|
+
caption: 'Keterangan 🌸',
|
|
287
|
+
gifPlayback: false // true = GIF looping 🔁
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
// 🎞️ Video note (bubble)
|
|
291
|
+
await sock.sendMessage(jid, {
|
|
292
|
+
video: fs.readFileSync('video.mp4'),
|
|
293
|
+
ptv: true
|
|
294
|
+
})
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## 🎵 Audio & Voice Note
|
|
300
|
+
|
|
301
|
+
```js
|
|
302
|
+
// 🎶 Audio biasa
|
|
303
|
+
await sock.sendMessage(jid, {
|
|
304
|
+
audio: { url: 'https://example.com/audio.mp3' },
|
|
305
|
+
mimetype: 'audio/mpeg'
|
|
306
|
+
})
|
|
307
|
+
|
|
308
|
+
// 🎙️ Voice note (PTT)
|
|
309
|
+
await sock.sendMessage(jid, {
|
|
310
|
+
audio: fs.readFileSync('voice.ogg'),
|
|
311
|
+
mimetype: 'audio/ogg; codecs=opus',
|
|
312
|
+
ptt: true
|
|
313
|
+
})
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## 📄 Dokumen
|
|
319
|
+
|
|
320
|
+
```js
|
|
321
|
+
await sock.sendMessage(jid, {
|
|
322
|
+
document: fs.readFileSync('file.pdf'),
|
|
323
|
+
mimetype: 'application/pdf',
|
|
324
|
+
fileName: 'dokumen.pdf',
|
|
325
|
+
caption: 'File ini 🍃'
|
|
326
|
+
})
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## 🎭 Sticker
|
|
332
|
+
|
|
333
|
+
```js
|
|
334
|
+
await sock.sendMessage(jid, {
|
|
335
|
+
sticker: fs.readFileSync('sticker.webp')
|
|
336
|
+
})
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## 📍 Lokasi
|
|
342
|
+
|
|
343
|
+
```js
|
|
344
|
+
await sock.sendMessage(jid, {
|
|
345
|
+
location: {
|
|
346
|
+
degreesLatitude: -6.2088,
|
|
347
|
+
degreesLongitude: 106.8456,
|
|
348
|
+
name: 'Monas 🌟',
|
|
349
|
+
address: 'Jakarta Pusat'
|
|
350
|
+
}
|
|
351
|
+
})
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## 👤 Kontak
|
|
357
|
+
|
|
358
|
+
```js
|
|
359
|
+
await sock.sendMessage(jid, {
|
|
360
|
+
contacts: {
|
|
361
|
+
displayName: 'Nama 💕',
|
|
362
|
+
contacts: [{
|
|
363
|
+
vcard: 'BEGIN:VCARD\nVERSION:3.0\nFN:Nama\nTEL:+62812345678\nEND:VCARD'
|
|
364
|
+
}]
|
|
365
|
+
}
|
|
366
|
+
})
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## 😍 Reaksi
|
|
372
|
+
|
|
373
|
+
```js
|
|
374
|
+
await sock.sendMessage(jid, { react: { text: '💖', key: m.key } })
|
|
375
|
+
// 🌸 Hapus reaksi
|
|
376
|
+
await sock.sendMessage(jid, { react: { text: '', key: m.key } })
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## 🗳️ Poll
|
|
382
|
+
|
|
383
|
+
```js
|
|
384
|
+
await sock.sendMessage(jid, {
|
|
385
|
+
poll: {
|
|
386
|
+
name: 'Pilih salah satu~ 🌷',
|
|
387
|
+
values: ['Opsi A 🌸', 'Opsi B 🌺', 'Opsi C 🌼'],
|
|
388
|
+
selectableCount: 1 // 0 = boleh pilih banyak 💞
|
|
389
|
+
}
|
|
390
|
+
})
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**🌟 Poll dengan fitur tambahan:**
|
|
394
|
+
```js
|
|
395
|
+
await sock.sendMessage(jid, {
|
|
396
|
+
poll: {
|
|
397
|
+
name: 'Nama Poll 💌',
|
|
398
|
+
values: ['Opsi A', 'Opsi B'],
|
|
399
|
+
selectableCount: 1,
|
|
400
|
+
endDate: new Date('2025-12-31'), // 📅 tanggal berakhir
|
|
401
|
+
hideVoter: true, // 🙈 sembunyikan nama pemilih
|
|
402
|
+
canAddOption: false, // 🔒 larang tambah opsi
|
|
403
|
+
toAnnouncementGroup: false // true = community announcement group (pollV2)
|
|
404
|
+
}
|
|
405
|
+
})
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**🧠 Quiz (Poll dengan jawaban benar):**
|
|
409
|
+
```js
|
|
410
|
+
await sock.sendMessage(jid, {
|
|
411
|
+
poll: {
|
|
412
|
+
name: 'Ibu kota Indonesia? 🌏',
|
|
413
|
+
values: ['Jakarta', 'Surabaya', 'Bandung'],
|
|
414
|
+
selectableCount: 1,
|
|
415
|
+
pollType: 1, // 1 = QUIZ 🎓
|
|
416
|
+
correctAnswer: 'Jakarta'
|
|
417
|
+
}
|
|
418
|
+
})
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## 📊 Poll Result
|
|
424
|
+
|
|
425
|
+
```js
|
|
426
|
+
await sock.sendMessage(jid, {
|
|
427
|
+
pollResult: {
|
|
428
|
+
name: 'Nama Poll 🌸',
|
|
429
|
+
votes: [
|
|
430
|
+
{ name: 'Opsi A 💖', voteCount: 10 },
|
|
431
|
+
{ name: 'Opsi B 🌷', voteCount: 5 }
|
|
432
|
+
],
|
|
433
|
+
pollType: 0 // 0 = POLL, 1 = QUIZ 🎓
|
|
434
|
+
}
|
|
435
|
+
})
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## 🗳️ Poll Update
|
|
441
|
+
|
|
442
|
+
```js
|
|
443
|
+
await sock.sendMessage(jid, {
|
|
444
|
+
pollUpdate: {
|
|
445
|
+
key: pollMessage.key, // 🗝️ key dari pesan poll yang mau di-vote
|
|
446
|
+
vote: encryptedVotePayload,
|
|
447
|
+
metadata: optionalMetadata
|
|
448
|
+
}
|
|
449
|
+
})
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## ↩️ Forward
|
|
455
|
+
|
|
456
|
+
```js
|
|
457
|
+
await sock.sendMessage(jid, {
|
|
458
|
+
forward: targetMessage,
|
|
459
|
+
force: true // 💌 paksa tampil sebagai forwarded
|
|
460
|
+
})
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## 🗑️ Hapus Pesan
|
|
466
|
+
|
|
467
|
+
```js
|
|
468
|
+
await sock.sendMessage(jid, { delete: m.key })
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## ✏️ Edit Pesan
|
|
474
|
+
|
|
475
|
+
```js
|
|
476
|
+
await sock.sendMessage(jid, {
|
|
477
|
+
text: 'Teks yang sudah diedit dengan penuh kasih~ 🌸',
|
|
478
|
+
edit: m.key
|
|
479
|
+
})
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## 📌 Pin Pesan
|
|
485
|
+
|
|
486
|
+
```js
|
|
487
|
+
// 📍 Pin
|
|
488
|
+
await sock.sendMessage(jid, {
|
|
489
|
+
pin: m.key,
|
|
490
|
+
type: 1,
|
|
491
|
+
time: 86400 // 86400=1hr 🕐 | 604800=7hr 🕰️ | 2592000=30hr 📆
|
|
492
|
+
})
|
|
493
|
+
// 🪄 Unpin
|
|
494
|
+
await sock.sendMessage(jid, { pin: m.key, type: 2 })
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## 🖼️ Album
|
|
500
|
+
|
|
501
|
+
```js
|
|
502
|
+
await sock.sendMessage(jid, {
|
|
503
|
+
album: [
|
|
504
|
+
{ image: { url: 'https://example.com/1.jpg' }, caption: 'Foto 1 🌸' },
|
|
505
|
+
{ image: { url: 'https://example.com/2.jpg' }, caption: 'Foto 2 🌷' },
|
|
506
|
+
{ video: { url: 'https://example.com/vid.mp4' }, caption: 'Video 💕' }
|
|
507
|
+
]
|
|
508
|
+
})
|
|
509
|
+
// 🌺 minimal 2 media ya~
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
---
|
|
513
|
+
|
|
514
|
+
## 📅 Event
|
|
515
|
+
|
|
516
|
+
```js
|
|
517
|
+
await sock.sendMessage(jid, {
|
|
518
|
+
event: {
|
|
519
|
+
name: 'Nama Acara 🌟',
|
|
520
|
+
description: 'Deskripsi indah 🌸',
|
|
521
|
+
startDate: new Date('2025-12-01T10:00:00'),
|
|
522
|
+
endDate: new Date('2025-12-01T12:00:00'),
|
|
523
|
+
location: {
|
|
524
|
+
degreesLatitude: -6.2088,
|
|
525
|
+
degreesLongitude: 106.8456,
|
|
526
|
+
name: 'Monas, Jakarta 🌆'
|
|
527
|
+
},
|
|
528
|
+
extraGuestsAllowed: true
|
|
529
|
+
}
|
|
530
|
+
})
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**📞 Event dengan scheduled call (audio/video):**
|
|
534
|
+
```js
|
|
535
|
+
await sock.sendMessage(jid, {
|
|
536
|
+
event: {
|
|
537
|
+
name: 'Meeting Online 💻',
|
|
538
|
+
startDate: new Date('2025-12-01T10:00:00'),
|
|
539
|
+
call: 'audio', // 🎙️ 'audio' | 📹 'video'
|
|
540
|
+
isScheduleCall: true
|
|
541
|
+
}
|
|
542
|
+
})
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
## 📸 Group Status / Group Story
|
|
548
|
+
|
|
549
|
+
```js
|
|
550
|
+
// 💬 Teks
|
|
551
|
+
await sock.sendMessage(groupJid, {
|
|
552
|
+
groupStatusMessage: { text: 'Status teks yang manis~ 🌸' }
|
|
553
|
+
})
|
|
554
|
+
|
|
555
|
+
// 🖼️ Gambar
|
|
556
|
+
await sock.sendMessage(groupJid, {
|
|
557
|
+
groupStatusMessage: {
|
|
558
|
+
image: { url: 'https://example.com/image.jpg' },
|
|
559
|
+
caption: 'Keterangan 💖'
|
|
560
|
+
}
|
|
561
|
+
})
|
|
562
|
+
|
|
563
|
+
// 🎥 Video
|
|
564
|
+
await sock.sendMessage(groupJid, {
|
|
565
|
+
groupStatusMessage: {
|
|
566
|
+
video: { url: 'https://example.com/video.mp4' },
|
|
567
|
+
caption: 'Keterangan 🌷'
|
|
568
|
+
}
|
|
569
|
+
})
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## ⚡ Flow Reply
|
|
575
|
+
|
|
576
|
+
> 💫 Balas pesan interaktif native flow dengan anggun~
|
|
577
|
+
|
|
578
|
+
```js
|
|
579
|
+
await sock.sendMessage(jid, {
|
|
580
|
+
flowReply: {
|
|
581
|
+
name: 'quick_reply', // 🔘 nama button yang ditekan
|
|
582
|
+
paramsJson: '{"id":"btn1"}',
|
|
583
|
+
text: 'Teks balasan 🌸',
|
|
584
|
+
format: 1,
|
|
585
|
+
version: 1
|
|
586
|
+
}
|
|
587
|
+
})
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
|
|
592
|
+
## 🔘 Button Reply
|
|
593
|
+
|
|
594
|
+
```js
|
|
595
|
+
// 🗂️ Template button
|
|
596
|
+
await sock.sendMessage(jid, {
|
|
597
|
+
buttonReply: {
|
|
598
|
+
displayText: 'Opsi yang dipilih 💕',
|
|
599
|
+
id: 'btn_id',
|
|
600
|
+
index: 0
|
|
601
|
+
},
|
|
602
|
+
type: 'template'
|
|
603
|
+
})
|
|
604
|
+
|
|
605
|
+
// 🔵 Plain button
|
|
606
|
+
await sock.sendMessage(jid, {
|
|
607
|
+
buttonReply: {
|
|
608
|
+
displayText: 'Opsi yang dipilih 🌸',
|
|
609
|
+
id: 'btn_id'
|
|
610
|
+
},
|
|
611
|
+
type: 'plain'
|
|
612
|
+
})
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
## 📌 Keep In Chat
|
|
618
|
+
|
|
619
|
+
```js
|
|
620
|
+
// 💾 Simpan
|
|
621
|
+
await sock.sendMessage(jid, {
|
|
622
|
+
keep: m.key,
|
|
623
|
+
keepType: 1 // 1 = keep 💖, 2 = unkeep 🍃
|
|
624
|
+
})
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
---
|
|
628
|
+
|
|
629
|
+
## 📞 Scheduled Call
|
|
630
|
+
|
|
631
|
+
```js
|
|
632
|
+
await sock.sendMessage(jid, {
|
|
633
|
+
call: {
|
|
634
|
+
time: Date.now() + 3600000,
|
|
635
|
+
type: 1, // 1 = voice 🎙️, 2 = video 📹
|
|
636
|
+
title: 'Meeting 🌸'
|
|
637
|
+
}
|
|
638
|
+
})
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
## 🔗 Group Invite
|
|
644
|
+
|
|
645
|
+
```js
|
|
646
|
+
await sock.sendMessage(jid, {
|
|
647
|
+
groupInvite: {
|
|
648
|
+
jid: 'xxx@g.us',
|
|
649
|
+
inviteCode: 'kode',
|
|
650
|
+
inviteExpiration: Date.now() + 86400000,
|
|
651
|
+
subject: 'Nama Grup 🌷',
|
|
652
|
+
text: 'Bergabunglah bersama kami~ 💕'
|
|
653
|
+
}
|
|
654
|
+
})
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
---
|
|
658
|
+
|
|
659
|
+
## 🛍️ Product
|
|
660
|
+
|
|
661
|
+
```js
|
|
662
|
+
await sock.sendMessage(jid, {
|
|
663
|
+
product: {
|
|
664
|
+
productImage: fs.readFileSync('produk.jpg'),
|
|
665
|
+
productId: 'prod_123',
|
|
666
|
+
title: 'Nama Produk 🌸',
|
|
667
|
+
description: 'Deskripsi cantik 💖',
|
|
668
|
+
currencyCode: 'IDR',
|
|
669
|
+
priceAmount1000: 50000000,
|
|
670
|
+
retailerId: 'sku_001',
|
|
671
|
+
url: 'https://toko.example.com/produk'
|
|
672
|
+
},
|
|
673
|
+
businessOwnerJid: '628xxx@s.whatsapp.net' // 🌟 wajib diisi ya~
|
|
674
|
+
})
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
---
|
|
678
|
+
|
|
679
|
+
## 👁️ View Once
|
|
680
|
+
|
|
681
|
+
```js
|
|
682
|
+
await sock.sendMessage(jid, {
|
|
683
|
+
image: { url: 'https://example.com/image.jpg' },
|
|
684
|
+
viewOnce: true // 🌸 sekali lihat, hilang bagai mimpi~
|
|
685
|
+
})
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
---
|
|
689
|
+
|
|
690
|
+
## 👁️ View Once V2
|
|
691
|
+
|
|
692
|
+
```js
|
|
693
|
+
await sock.sendMessage(jid, {
|
|
694
|
+
image: { url: 'https://example.com/image.jpg' },
|
|
695
|
+
viewOnceV2: true // 💫 wrap ke viewOnceMessageV2
|
|
696
|
+
})
|
|
697
|
+
|
|
698
|
+
// 🌟 viewOnceV2Extension
|
|
699
|
+
await sock.sendMessage(jid, {
|
|
700
|
+
image: { url: 'https://example.com/image.jpg' },
|
|
701
|
+
viewOnceV2Extension: true
|
|
702
|
+
})
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
---
|
|
706
|
+
|
|
707
|
+
## ⏱️ Ephemeral
|
|
708
|
+
|
|
709
|
+
> 🍃 Wrap pesan ke dalam `ephemeralMessage` — pesan yang menghilang seperti embun pagi~
|
|
710
|
+
|
|
711
|
+
```js
|
|
712
|
+
await sock.sendMessage(jid, {
|
|
713
|
+
text: 'Pesan ini ephemeral 🌸',
|
|
714
|
+
ephemeral: true
|
|
715
|
+
})
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
---
|
|
719
|
+
|
|
720
|
+
## 🫣 Spoiler
|
|
721
|
+
|
|
722
|
+
> 🎀 Wrap pesan ke dalam `spoilerMessage` — untuk kejutan yang manis~
|
|
723
|
+
|
|
724
|
+
```js
|
|
725
|
+
await sock.sendMessage(jid, {
|
|
726
|
+
image: { url: 'https://example.com/image.jpg' },
|
|
727
|
+
caption: 'Spoiler! 🌷',
|
|
728
|
+
spoiler: true
|
|
729
|
+
})
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
---
|
|
733
|
+
|
|
734
|
+
## 📢 Group Status Wrap
|
|
735
|
+
|
|
736
|
+
> 💕 Wrap pesan biasa menjadi `groupStatusMessageV2`~
|
|
737
|
+
|
|
738
|
+
```js
|
|
739
|
+
await sock.sendMessage(jid, {
|
|
740
|
+
text: 'Status di grup ini 🌸',
|
|
741
|
+
groupStatus: true
|
|
742
|
+
})
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
---
|
|
746
|
+
|
|
747
|
+
## 🌀 Lottie Sticker
|
|
748
|
+
|
|
749
|
+
> ✨ Wrap sticker ke dalam `lottieStickerMessage` — animasi yang memukau~
|
|
750
|
+
|
|
751
|
+
```js
|
|
752
|
+
await sock.sendMessage(jid, {
|
|
753
|
+
sticker: fs.readFileSync('sticker.webp'),
|
|
754
|
+
isLottie: true
|
|
755
|
+
})
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
760
|
+
## 🔲 Buttons
|
|
761
|
+
|
|
762
|
+
> 💖 Kirim pesan dengan tombol interaktif yang menggemaskan~
|
|
763
|
+
|
|
764
|
+
```js
|
|
765
|
+
// 💬 Dengan teks biasa
|
|
766
|
+
await sock.sendMessage(jid, {
|
|
767
|
+
text: 'Pilih salah satu ya sayang~ 🌸',
|
|
768
|
+
footer: 'Footer pesan 🍃',
|
|
769
|
+
buttons: [
|
|
770
|
+
{ id: 'btn1', text: 'Tombol 1 💕' },
|
|
771
|
+
{ id: 'btn2', text: 'Tombol 2 🌷' },
|
|
772
|
+
{ id: 'btn3', text: 'Tombol 3 🌺' }
|
|
773
|
+
]
|
|
774
|
+
})
|
|
775
|
+
|
|
776
|
+
// 🖼️ Dengan gambar sebagai header
|
|
777
|
+
await sock.sendMessage(jid, {
|
|
778
|
+
image: { url: 'https://example.com/image.jpg' },
|
|
779
|
+
caption: 'Isi pesan 💖',
|
|
780
|
+
footer: 'Footer 🌸',
|
|
781
|
+
buttons: [
|
|
782
|
+
{ id: 'btn1', text: 'Pilih A 🌷' },
|
|
783
|
+
{ id: 'btn2', text: 'Pilih B 🌺' }
|
|
784
|
+
]
|
|
785
|
+
})
|
|
786
|
+
|
|
787
|
+
// 🌊 Native flow button (single select dengan sections)
|
|
788
|
+
await sock.sendMessage(jid, {
|
|
789
|
+
text: 'Pilih menu~ 🌸',
|
|
790
|
+
buttons: [
|
|
791
|
+
{
|
|
792
|
+
text: 'Buka Menu 💕',
|
|
793
|
+
sections: [
|
|
794
|
+
{
|
|
795
|
+
title: 'Kategori A 🌷',
|
|
796
|
+
rows: [
|
|
797
|
+
{ id: 'row1', title: 'Item 1 🌸', description: 'Deskripsi manis' },
|
|
798
|
+
{ id: 'row2', title: 'Item 2 🌺' }
|
|
799
|
+
]
|
|
800
|
+
}
|
|
801
|
+
]
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
})
|
|
805
|
+
|
|
806
|
+
// ✨ Native flow button dengan name kustom
|
|
807
|
+
await sock.sendMessage(jid, {
|
|
808
|
+
text: 'Pilih~ 💖',
|
|
809
|
+
buttons: [
|
|
810
|
+
{ name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Quick Reply 🌸' }
|
|
811
|
+
]
|
|
812
|
+
})
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
---
|
|
816
|
+
|
|
817
|
+
## 📋 List Message
|
|
818
|
+
|
|
819
|
+
> 🌷 Kirim pesan daftar pilihan yang teratur dan elegan~
|
|
820
|
+
|
|
821
|
+
```js
|
|
822
|
+
await sock.sendMessage(jid, {
|
|
823
|
+
text: 'Silakan pilih~ 🌸',
|
|
824
|
+
title: 'Judul List 💕',
|
|
825
|
+
buttonText: 'Buka Daftar 🌷',
|
|
826
|
+
footer: 'Footer pesan 🍃',
|
|
827
|
+
sections: [
|
|
828
|
+
{
|
|
829
|
+
title: 'Bagian 1 🌺',
|
|
830
|
+
rows: [
|
|
831
|
+
{ id: 'row1', title: 'Pilihan A 💖', description: 'Deskripsi A yang manis' },
|
|
832
|
+
{ id: 'row2', title: 'Pilihan B 🌸', description: 'Deskripsi B yang lembut' }
|
|
833
|
+
]
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
title: 'Bagian 2 🌼',
|
|
837
|
+
rows: [
|
|
838
|
+
{ id: 'row3', title: 'Pilihan C 🌷' }
|
|
839
|
+
]
|
|
840
|
+
}
|
|
841
|
+
]
|
|
842
|
+
})
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
---
|
|
846
|
+
|
|
847
|
+
## 🗂️ Template Buttons
|
|
848
|
+
|
|
849
|
+
> 💌 Tombol template (quick reply, URL, call) — tampil di WhatsApp Web/Desktop & iOS~
|
|
850
|
+
|
|
851
|
+
```js
|
|
852
|
+
// 💬 Dengan teks
|
|
853
|
+
await sock.sendMessage(jid, {
|
|
854
|
+
text: 'Pesan template 🌸',
|
|
855
|
+
footer: 'Footer 🍃',
|
|
856
|
+
id: 'template-unik',
|
|
857
|
+
templateButtons: [
|
|
858
|
+
{ id: 'btn1', text: 'Quick Reply 💕' },
|
|
859
|
+
{ url: 'https://example.com', text: 'Kunjungi Website 🌐' },
|
|
860
|
+
{ call: '+62812345678', text: 'Hubungi Kami 📞' }
|
|
861
|
+
]
|
|
862
|
+
})
|
|
863
|
+
|
|
864
|
+
// 🖼️ Dengan gambar sebagai header
|
|
865
|
+
await sock.sendMessage(jid, {
|
|
866
|
+
image: { url: 'https://example.com/img.jpg' },
|
|
867
|
+
caption: 'Isi pesan 💖',
|
|
868
|
+
title: 'Judul 🌸',
|
|
869
|
+
footer: 'Footer 🌷',
|
|
870
|
+
templateButtons: [
|
|
871
|
+
{ id: 'btn1', text: 'Klik Sini 💕' },
|
|
872
|
+
{ url: 'https://example.com', text: 'Buka Link 🌐' }
|
|
873
|
+
]
|
|
874
|
+
})
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
---
|
|
878
|
+
|
|
879
|
+
## 🌊 Native Flow
|
|
880
|
+
|
|
881
|
+
> ✨ Pesan interaktif dengan native flow buttons yang indah — mendukung media header & audio footer~
|
|
882
|
+
|
|
883
|
+
```js
|
|
884
|
+
// 💬 Teks dengan native flow buttons
|
|
885
|
+
await sock.sendMessage(jid, {
|
|
886
|
+
text: 'Pilih aksi~ 🌸',
|
|
887
|
+
footer: 'Footer pesan 🍃',
|
|
888
|
+
nativeFlow: [
|
|
889
|
+
{ name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Opsi 1 💕' },
|
|
890
|
+
{ name: 'quick_reply', paramsJson: '{"id":"2"}', text: 'Opsi 2 🌷' }
|
|
891
|
+
]
|
|
892
|
+
})
|
|
893
|
+
|
|
894
|
+
// 🖼️ Dengan gambar sebagai header
|
|
895
|
+
await sock.sendMessage(jid, {
|
|
896
|
+
image: { url: 'https://example.com/img.jpg' },
|
|
897
|
+
caption: 'Isi pesan 💖',
|
|
898
|
+
title: 'Judul 🌸',
|
|
899
|
+
subtitle: 'Subjudul 🌷',
|
|
900
|
+
footer: 'Footer 🍃',
|
|
901
|
+
nativeFlow: [
|
|
902
|
+
{ name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol 1 💕' }
|
|
903
|
+
]
|
|
904
|
+
})
|
|
905
|
+
|
|
906
|
+
// 🎵 Dengan audio footer
|
|
907
|
+
await sock.sendMessage(jid, {
|
|
908
|
+
text: 'Pesan dengan audio footer 🎶',
|
|
909
|
+
audioFooter: fs.readFileSync('audio.ogg'),
|
|
910
|
+
nativeFlow: [
|
|
911
|
+
{ name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'OK 💖' }
|
|
912
|
+
]
|
|
913
|
+
})
|
|
914
|
+
|
|
915
|
+
// 🎀 Wrap sebagai templateMessage
|
|
916
|
+
await sock.sendMessage(jid, {
|
|
917
|
+
text: 'Template interaktif 🌸',
|
|
918
|
+
nativeFlow: [
|
|
919
|
+
{ name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol 💕' }
|
|
920
|
+
],
|
|
921
|
+
interactiveAsTemplate: true,
|
|
922
|
+
id: 'template-id-unik'
|
|
923
|
+
})
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
---
|
|
927
|
+
|
|
928
|
+
## 🎠 Carousel
|
|
929
|
+
|
|
930
|
+
> 🌺 Pesan carousel dengan kartu-kartu yang cantik (image/video/product per kartu)~
|
|
931
|
+
|
|
932
|
+
```js
|
|
933
|
+
await sock.sendMessage(jid, {
|
|
934
|
+
text: 'Carousel utama 🌸',
|
|
935
|
+
footer: 'Footer utama 🍃',
|
|
936
|
+
cards: [
|
|
937
|
+
{
|
|
938
|
+
image: { url: 'https://example.com/1.jpg' },
|
|
939
|
+
title: 'Kartu 1 💕',
|
|
940
|
+
caption: 'Deskripsi kartu 1 yang manis 🌷',
|
|
941
|
+
footer: 'Footer kartu 1 🌸',
|
|
942
|
+
nativeFlow: [
|
|
943
|
+
{ name: 'quick_reply', paramsJson: '{"id":"c1"}', text: 'Pilih Ini 💖' }
|
|
944
|
+
]
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
image: { url: 'https://example.com/2.jpg' },
|
|
948
|
+
title: 'Kartu 2 🌺',
|
|
949
|
+
caption: 'Deskripsi kartu 2 yang indah 🌼',
|
|
950
|
+
nativeFlow: [
|
|
951
|
+
{ name: 'quick_reply', paramsJson: '{"id":"c2"}', text: 'Pilih Itu 🌸' }
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
]
|
|
955
|
+
})
|
|
956
|
+
```
|
|
957
|
+
|
|
958
|
+
---
|
|
959
|
+
|
|
960
|
+
<div align="center">
|
|
961
|
+
<br/>
|
|
962
|
+
<i>🌸 Dibuat dengan cinta dan dedikasi oleh <b>NuiiS4TORU</b> 💖</i><br/>
|
|
963
|
+
<i>✨ Semoga library ini membawa kebahagiaan dalam setiap project-mu~ 🌷</i>
|
|
964
|
+
<br/><br/>
|
|
965
|
+
</div>
|