Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Role connections & subscriptions #1487

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from

Conversation

iiFDCT
Copy link
Contributor

@iiFDCT iiFDCT commented Feb 7, 2024

Adds role connections to Eris.

Hopefully I haven't missed anything. I've checked both the docs and the above PR in the API GH repo (that Bsian kindly linked for me) but honestly the pr diff was a mess and hard to read so I could've missed something.

Also adds role subscriptions to Eris.

I need to add the message content for the role subscription message that Discord sends, but I've no idea wtf the content is so any help would be appreciated!

Additions:

  • editRoleConnectionMetadataRecords() func in Client
  • getRoleConnectionMetadataRecords() func in Client
  • Message#roleSubscriptionData property
  • Documented role_connections_verification_url property under OAuthApplicationInfo
  • Obviously also added the necessary constants types, as well as the endpoint that the aforementioned functions use

@bsian03 bsian03 added the Discord label Feb 7, 2024
@iiFDCT iiFDCT changed the title feat: Role connections feat: Role connections & subscriptions Feb 10, 2024
lib/structures/Message.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@bsian03 bsian03 left a comment

Choose a reason for hiding this comment

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

This is everything related to role connections

* @returns {Promise<Array<Object>>} An array of role connection metadata objects
*/
editRoleConnectionMetadataRecords(data) {
return this.requestHandler.request("PUT", Endpoints.ROLE_CONNECTION_METADATA_RECORDS(this.application.id), true, data);
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be worth regex validating key. We do the same thing for application command names

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. How's that?

index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@bsian03 bsian03 left a comment

Choose a reason for hiding this comment

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

role subscriptions

index.d.ts Show resolved Hide resolved
lib/structures/Message.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants