Skip to content

Conversation

@Jaskowicz1
Copy link
Contributor

@Jaskowicz1 Jaskowicz1 commented Sep 8, 2025

This PR adds the new PIN_MESSAGES permission, and changes the get/set/unset pinned message endpoints to the new endpoints.

Because of the new endpoints, the channel_get_pins endpoint no longer returns the same data, meaning we now had to change this, causing a breaking change to make it conform to the new standard that Discord has set.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@netlify
Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit a1d380f
🔍 Latest deploy log https://app.netlify.com/projects/dpp-dev/deploys/68c442a2330dd10008be37f9
😎 Deploy Preview https://deploy-preview-1480--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels Sep 8, 2025
@braindigitalis
Copy link
Contributor

when it compiles, good to merge.
how far are we now from reaching the limit of uint64_t, they are going very close to 64 different unique permissions!

@Jaskowicz1
Copy link
Contributor Author

Ikr, they getting close!

@Jaskowicz1 Jaskowicz1 marked this pull request as ready for review September 8, 2025 19:28
@Jaskowicz1 Jaskowicz1 changed the title feat, refactor: Added Pin permission, updated pin endpoints breaking: rewrote channel_get_pins, added Pin Message permission, updated pin endpoints. Sep 8, 2025
@Jaskowicz1 Jaskowicz1 added the breaking This pull request introduces breaking changes label Sep 8, 2025
@Jaskowicz1
Copy link
Contributor Author

Updated the PR's title and description.

@Jaskowicz1
Copy link
Contributor Author

Actually im gonna put this back into draft, need to add the before and limit parameters.

@Jaskowicz1 Jaskowicz1 marked this pull request as draft September 8, 2025 19:35
@Jaskowicz1 Jaskowicz1 marked this pull request as ready for review September 8, 2025 20:07
@Jaskowicz1
Copy link
Contributor Author

Just to note, I used std::optional<> on purpose as those fields are optional but we don't allow command_completion_event_t to be optional for getters.

I used uint64_t for the limit field because we've done the same above, but I can correct that if wanted (we only need it to be uint8_t really).

@braindigitalis
Copy link
Contributor

ship it letsgoooooo

@Jaskowicz1 Jaskowicz1 merged commit b06d263 into dev Sep 15, 2025
67 checks passed
@Jaskowicz1 Jaskowicz1 deleted the pin_permission branch October 5, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking This pull request introduces breaking changes code Improvements or additions to code. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants