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 #906

Merged
merged 11 commits into from
Jan 17, 2023
Merged

feat: role connections #906

merged 11 commits into from
Jan 17, 2023

Conversation

shiftinv
Copy link
Member

@shiftinv shiftinv commented Jan 5, 2023

Summary

Implements application role connection ("linked roles") metadata and role_connections_verification_url from discord/discord-api-docs#5668, as well as RoleTags.is_linked_role from discord/discord-api-docs#5771.

Note that the GET/PUT /users/@me/applications/{application.id}/role-connection route isn't implemented, since that's more on the oauth side of things.
As such, this PR supports fetching/editing the metadata configured by the bot ("guilds can require users to have some minimum number of cookies"), but evidently doesn't allow fetching/editing specific users' metadata values ("user x has y cookies").

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running task lint
    • I have type-checked the code by running task pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@shiftinv shiftinv added t: enhancement New feature t: api support Support of Discord API features s: needs review Issue/PR is awaiting reviews s: waiting for api/docs Issue/PR is waiting for API support/documentation labels Jan 5, 2023
@shiftinv shiftinv added this to the disnake v2.8 milestone Jan 5, 2023
@shiftinv shiftinv removed the s: waiting for api/docs Issue/PR is waiting for API support/documentation label Jan 6, 2023
Copy link
Member

@Victorsitou Victorsitou left a comment

Choose a reason for hiding this comment

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

the pr looks good after all

disnake/application_role_connection.py Outdated Show resolved Hide resolved
disnake/client.py Show resolved Hide resolved
disnake/client.py Show resolved Hide resolved
disnake/client.py Show resolved Hide resolved
Copy link
Member

@Victorsitou Victorsitou left a comment

Choose a reason for hiding this comment

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

other than that, looks good to me 👍

changelog/906.feature.rst Outdated Show resolved Hide resolved
Copy link
Member

@Victorsitou Victorsitou left a comment

Choose a reason for hiding this comment

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

🎉

@shiftinv shiftinv merged commit 5ef570d into master Jan 17, 2023
@shiftinv shiftinv deleted the feature/role-connections branch January 17, 2023 15:23
@onerandomusername onerandomusername removed the s: needs review Issue/PR is awaiting reviews label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: api support Support of Discord API features t: enhancement New feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants