Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add full support for guild stickers #584

Merged
merged 8 commits into from
May 6, 2024
Merged

Add full support for guild stickers #584

merged 8 commits into from
May 6, 2024

Conversation

jb3
Copy link
Collaborator

@jb3 jb3 commented May 5, 2024

This extends the support we already had in Nostrum for guild stickers by adding
all the missing API routes, structs and so on.

  • Add all missing fields to sticker struct and move the enums to atoms
  • Add a new cdn_url/1 method to the sticker struct for fetching the CDN URL
  • Add all API routes required to fetch and manage guild stickers
  • Add API route for fetching public sticker packs
  • Update all caches to be able to handle sticker updates for dispatches to users
  • Add tests for all of the above
  • Change the permissions to reflect the new naming for
    manage_guild_expressions and the addition of the new
    create_guild_expressions permission

@jb3 jb3 force-pushed the jb3/sticker-revamps branch 5 times, most recently from a2499ca to d9fc583 Compare May 5, 2024 04:16
@jb3 jb3 force-pushed the jb3/sticker-revamps branch from d9fc583 to 95c260c Compare May 5, 2024 04:21
@jb3 jb3 requested a review from jchristgit May 5, 2024 10:52
Copy link
Collaborator

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very high quality. A few minor nitpicks.

lib/nostrum/api.ex Outdated Show resolved Hide resolved
lib/nostrum/api.ex Show resolved Hide resolved
lib/nostrum/struct/sticker.ex Outdated Show resolved Hide resolved
lib/nostrum/struct/sticker.ex Outdated Show resolved Hide resolved
lib/nostrum/struct/sticker.ex Outdated Show resolved Hide resolved
lib/nostrum/struct/sticker.ex Outdated Show resolved Hide resolved
lib/nostrum/struct/sticker.ex Outdated Show resolved Hide resolved
lib/nostrum/struct/sticker/pack.ex Outdated Show resolved Hide resolved
lib/nostrum/struct/sticker/pack.ex Outdated Show resolved Hide resolved
lib/nostrum/struct/sticker/pack.ex Show resolved Hide resolved
jb3 added 5 commits May 5, 2024 20:21
Refactors the previous Sticker struct that lived under message and add
new cdn_url/1 method for finding the CDN URL of a sticker.
Update cache bases and our implementations to support stickers and allow
the proper dispatching of sticker update events.
@jb3 jb3 force-pushed the jb3/sticker-revamps branch from 95c260c to c7c456e Compare May 5, 2024 19:21
@jb3 jb3 requested a review from jchristgit May 5, 2024 19:23
- Rename the manage_emojis_and_stickers permission to
`manage_guild_expressions`
- Add the new `create_guild_expressions` permission
- Add a legacy mapping system for creating bitsets with the old
permission name as a *bit* of backwards compatibility
@jb3 jb3 force-pushed the jb3/sticker-revamps branch from c7c456e to 71b0d9a Compare May 5, 2024 19:26
Copy link
Collaborator

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!!!

@jb3 jb3 merged commit e07393f into master May 6, 2024
9 checks passed
@jb3 jb3 deleted the jb3/sticker-revamps branch May 6, 2024 17:49
@jb3
Copy link
Collaborator Author

jb3 commented May 6, 2024

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants