Skip to content

Conversation

@AsadHumayun
Copy link
Contributor

@AsadHumayun AsadHumayun commented Jan 24, 2026

This PR will add the StickerPack structure.

createdAt and createdTimestamp were missing on the Sticker structure, so I went ahead and added that as part of this PR as well. We should be able to derive these properties as a snowflake id is present for that structure.

This PR does not add tests.

Mentioning #10981 for visibility.

@vercel
Copy link

vercel bot commented Jan 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Review Updated (UTC)
discord-js Skipped Skipped Jan 27, 2026 11:03pm
discord-js-guide Skipped Skipped Jan 27, 2026 11:03pm

Request Review

@vercel vercel bot temporarily deployed to Preview – discord-js January 24, 2026 20:43 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js-guide January 24, 2026 20:43 Inactive
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Walkthrough

This pull request introduces a new StickerPack class to expose sticker pack data through typed getters and timestamp utilities, while extending the Sticker class with createdTimestamp and createdAt getters that derive creation time from the Snowflake ID.

Changes

Cohort / File(s) Summary
New StickerPack Implementation
packages/structures/src/stickers/StickerPack.ts, packages/structures/src/stickers/index.ts
Introduces StickerPack class extending Structure with 8 public getters (id, name, skuId, coverStickerId, description, bannerAssetId, createdTimestamp, createdAt). Exports class via index. Includes timestamp derivation from Snowflake ID via DiscordSnowflake utility.
Sticker Timestamp Enhancements
packages/structures/src/stickers/Sticker.ts
Adds createdTimestamp and createdAt getters to existing Sticker class. Both derive values from Snowflake ID when valid, otherwise return null.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main objective of adding a StickerPack structure to the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly outlines the changes: adding StickerPack structure and createdAt/createdTimestamp to Sticker, with rationale for missing snowflake-derived properties.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

❌ Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.80%. Comparing base (693fcbc) to head (d6e7624).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/structures/src/stickers/StickerPack.ts 0.00% 20 Missing ⚠️
packages/structures/src/stickers/Sticker.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11398      +/-   ##
==========================================
- Coverage   31.86%   31.80%   -0.06%     
==========================================
  Files         379      380       +1     
  Lines       13813    13838      +25     
  Branches     1089     1093       +4     
==========================================
  Hits         4401     4401              
- Misses       9278     9303      +25     
  Partials      134      134              
Flag Coverage Δ
structures 37.78% <0.00%> (-0.72%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-project-automation github-project-automation bot moved this from Todo to Review in Progress in discord.js Jan 24, 2026
@vercel vercel bot temporarily deployed to Preview – discord-js-guide January 24, 2026 22:07 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js January 24, 2026 22:07 Inactive
@github-project-automation github-project-automation bot moved this from Review in Progress to Review Approved in discord.js Jan 27, 2026
@vercel vercel bot temporarily deployed to Preview – discord-js-guide January 27, 2026 23:03 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js January 27, 2026 23:03 Inactive
@kodiakhq kodiakhq bot merged commit 1251d47 into discordjs:main Jan 27, 2026
8 checks passed
@github-project-automation github-project-automation bot moved this from Review Approved to Done in discord.js Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants