Skip to content

feat(media): add customizable sticker pack and author metadata - #67

Closed
cilldev wants to merge 0 commit into
zeative:mainfrom
cilldev:main
Closed

feat(media): add customizable sticker pack and author metadata#67
cilldev wants to merge 0 commit into
zeative:mainfrom
cilldev:main

Conversation

@cilldev

@cilldev cilldev commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🎨 Feature: Customizable Sticker Pack & Author Metadata

Allows developers to dynamically specify custom pack and author metadata when creating stickers via media.sticker().


🚀 What's New?

1. 🏷️ Dynamic Sticker Metadata

Developers can now specify custom metadata for sticker creation:

await client.send(jid).sticker(buffer, {
  pack: 'My Custom Pack',
  author: 'Zaileys Bot',
});

Defaults gracefully to configured global metadata if custom options are omitted.

2. 🐛 Message Context Decoder Fix

Improved decodeQuotedContext resolution for replied messages across group and DM contexts.


🛠️ Summary of Changes

Component Type Details
src/media/ffmpeg/sticker.ts 🌟 Feature Added support for custom pack & author metadata options
src/builder/content/sticker.ts 🌟 Feature Exposed pack & author parameters in sticker builder API
src/events/decoders/messages.ts 🐛 Fix Fixed quoted message context resolution for replied messages
tests/media/sticker-processor.test.ts 🧪 Test Added unit tests verifying custom metadata encoding

🧪 Verification & Audit

  • TypeScript Type Check: Passed clean (tsc --noEmit)
  • Unit & Integration Tests: All 570+ test cases passed (pnpm test)
  • Code Quality: Audited comments and strict typing rules

🔍 Backwards Compatibility Check

  • Breaking Changes? NO
  • All existing calls to .sticker(buffer) remain 100% backwards-compatible.

@zeative

zeative commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR. Two of the three commits are now on main:

  • ecfe8c6feat(media): customizable sticker pack/author metadata
  • d4bef2ffix(events): quoted message context decoding

Verified before merge: tsc --noEmit clean, comment/any audits clean, 2510 tests passing.

Small cleanup applied on merge (f10106d): dropped bun.lock (this repo is pnpm), reverted the manual 4.9.0 bump and CHANGELOG.md edit in favour of a changeset, and restored the two unrelated test edits — the original PNG fixture and the 5s contract timeout both pass here, so neither change was needed.

8bca8c6 (sendGroupStatus) is held back for now — not rejected, just needs its own PR. Main blockers: it also changes the command system from this.on('text') to this.on('message'), which are not equivalent (message fires for every decoded message, so commands would run on stickers, reactions, etc.), and that isn't mentioned in the description or covered by a test. The method itself also needs a typed content parameter and test coverage before it lands.

Leaving this PR open for that part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants