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(app-cmds): Implement User-Installed Apps #1181

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Kevin-OVI
Copy link
Contributor

Summary

This PR implements the "integration_types" and "contexts" fields on app commands to support User-Installed Apps. It also deprecates the "dm_permission" parameter in all application commands, as it has been replaced by "contexts".
The PR is marked as draft because user apps are still in preview.

This is a Code Change

  • I have tested my changes.
  • I have updated the documentation to reflect the changes.
  • I have run task pyright and fixed the relevant issues.

Copy link
Collaborator

@spifory spifory left a comment

Choose a reason for hiding this comment

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

You likely want to take a look at discord/discord-api-docs#6723 to implement as it seems a lot is missing in this PR (I do understand this is still a draft though)

nextcord/enums.py Show resolved Hide resolved
@Kevin-OVI
Copy link
Contributor Author

You likely want to take a look at discord/discord-api-docs#6723 to implement as it seems a lot is missing in this PR (I do understand this is still a draft though)

I only had implemented what I had seen as necessary to enable user installed apps, without checking what had actually changed in the change-log. I think everything from there is now implemented.

@Kevin-OVI
Copy link
Contributor Author

I see that the pre-commit.ci check is failing. Is there anyway I can fix the rust compiler not being installed ? I ran task lint on my side before committing so there shouldn't be any issues.

@alentoghostflame
Copy link
Collaborator

alentoghostflame commented May 14, 2024

I see that the pre-commit.ci check is failing. Is there anyway I can fix the rust compiler not being installed ? I ran task lint on my side before committing so there shouldn't be any issues.

I don't believe so, I think we have to wait for a libcst wheel to be published for the platform + version that the pre-commit.ci check uses.

Copy link
Collaborator

@EmreTech EmreTech left a comment

Choose a reason for hiding this comment

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

Looks good otherwise!

nextcord/message.py Outdated Show resolved Hide resolved
nextcord/enums.py Outdated Show resolved Hide resolved
nextcord/enums.py Outdated Show resolved Hide resolved
nextcord/enums.py Outdated Show resolved Hide resolved
@EmreTech EmreTech added p: medium Priority: medium - should be worked on in the near future s: awaiting review Status: the issue or PR is awaiting reviews t: api coverage Type: api coverage - this adds code to cover the discord API s: waiting for discord status: the issue requires changes to the documentation or behaviour before it can be completed. labels May 18, 2024
Copy link
Collaborator

@spifory spifory left a comment

Choose a reason for hiding this comment

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

I seem to have made this review a month ago and forgot, but anyways just some nitpicks in the code

nextcord/appinfo.py Outdated Show resolved Hide resolved
nextcord/appinfo.py Outdated Show resolved Hide resolved
nextcord/appinfo.py Outdated Show resolved Hide resolved
@spifory spifory removed the s: waiting for discord status: the issue requires changes to the documentation or behaviour before it can be completed. label May 19, 2024
nextcord/application_command.py Outdated Show resolved Hide resolved
None if integration_types is None else [IntegrationType(x) for x in integration_types]
)

if dm_permission is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

DeprecationWarning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking this argument could be removed as it's a breaking change and the next version would be 3.0 anyway.

Copy link
Collaborator

@EmreTech EmreTech left a comment

Choose a reason for hiding this comment

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

Tested! 🎉

nextcord/message.py Outdated Show resolved Hide resolved
Kevin-OVI and others added 2 commits May 22, 2024 19:23
Co-authored-by: teaishealthy <76410798+teaishealthy@users.noreply.github.com>
Co-authored-by: Emma Terzioglu <50607143+EmreTech@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: medium Priority: medium - should be worked on in the near future s: awaiting review Status: the issue or PR is awaiting reviews t: api coverage Type: api coverage - this adds code to cover the discord API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants