feat: add native sticker pack send support#201797
Open
sergiooak wants to merge 5 commits into
Open
Conversation
co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adds sendMediaAsStickerPack option to sendMessage, accepting a messagemedia[] array. Stickers are converted to webp, packed into a zip with a tray icon, uploaded via the WhatsApp Web upload manager, and sent as a native sticker-pack message with an auto-generated grid thumbnail. internal helpers (_mediaToWebp, _writeStickerExif, _inspectWebpSticker, _zip) are shared with the existing single-sticker path, eliminating duplicated EXIF-building code. co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adds STICKER_PACK to MessageTypes enum, MessageMedia[] to MessageContent, and five new fields to MessageSendOptions: sendMediaAsStickerPack, stickerpackname, stickerPackPublisher, stickerPackId, stickerPackTrayIcon. co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace generated DiceBear image URLs - Add real Sticker.ly sticker assets to pack demo - Keep native sticker pack creation flow unchanged
7 tasks
|
nice. |
Author
|
C.c @purpshell, @tuyuribr3 and @alechkos |
tuyuribr
requested changes
Jul 9, 2026
| } | ||
| } else if (msg.body === '!pack') { | ||
| const urls = [ | ||
| 'https://sticker-ly-api.sergiooak.com.br/file/sticker_pack/MGU8sA927ahRF7KMT9dluA/PTHH2U/42/-588087217.png', |
Collaborator
There was a problem hiding this comment.
Please use github urls (from inside this rep) ( you can create files as examples, one or two test images)
| "node": ">=18.0.0" | ||
| }, | ||
| "optionalDependencies": { | ||
| "archiver": "7.0.1", |
Collaborator
There was a problem hiding this comment.
I would still make archiver optional, can you include it outsite src/util/Util.js#7 ? ( Only inside the function we need it ? )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Adds support for sending a native sticker pack via
sendMessage. Pass aMessageMedia[]array withsendMediaAsStickerPack: trueand the library will:stickerPackTrayIcon)sticker-packtypeNew
sendMessageoptions:sendMediaAsStickerPackbooleanMessageMedia[]as a sticker packstickerPackNamestringstickerPackPublisherstringstickerPackIdstringstickerPackTrayIconMessageMedia | nullInternal refactor: the pre-existing
formatToWebpStickersingle-sticker path now shares the new_writeStickerExif,_mediaToWebp, and_inspectWebpStickerhelpers, eliminating duplicated EXIF-building code.Related Issue(s)
#3614 3614
Testing Summary
Test Details
stickerPackTrayIcon) replaces the default first-sticker icon.npm test— all existing tests pass.Environment
Machine OS: Windows 11
Phone OS:
Library Version: 1.34.7
WhatsApp Web Version: 2.3000.1041450038
Browser Type and Version: Chrome 149.0.7827
Node Version: 26.2.0
Type of Change
optionalDependenciestodependencies)Checklist
npm test).index.d.ts) have been updated if necessary.example.js) / documentation have been updated if applicable.