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

First pass at supporting user apps #9760

Merged
merged 16 commits into from May 5, 2024
Merged

First pass at supporting user apps #9760

merged 16 commits into from May 5, 2024

Conversation

Rapptz
Copy link
Owner

@Rapptz Rapptz commented Mar 19, 2024

This is based off of previous work by Red in #9406 and their subsequent branch. I've merely adapted and fixed some of it.

There are a few things I'm mostly nebulous about that I need to mull over some more:

  1. The authorized_integration_owner type is pretty useless, I can't imagine a use case for it nor a good way to expose it since its information is duplicated elsewhere in the schema.
  2. AppIntegrationType as a type feels wrong. It should probably be an enum or renamed to AppInstallationType since that's.. what it is. The original naming feels like a misstep on Discord's side.
  3. AppContextType is an ArrayFlags currently but due to a losing battle discussing this with them I think this might be better off as an Enum instead.
  4. The naming schemes are a bit inconsistent, e.g. the decorators are install_types/user_install/guild_install but the inner types and properties are called integration_types. Again, this feels like a misstep on Discord's side.
  5. Permissions probably need more mocking for the various channel.permissions_for code that people have littered around.
  6. The new interaction_metadata type needs to be added to Message
  7. The new fields in AppInfo need to be added as well.

Rapptz and others added 3 commits March 19, 2024 18:20
Co-authored-by: red <red@kalab.sk>
Co-authored-by: Vioshim <63890837+Vioshim@users.noreply.github.com>
@Rapptz Rapptz mentioned this pull request Mar 19, 2024
6 tasks
* Refactor values for AppCommandContext and AppInstallationType

* Fix initialization of self.context in Interaction class

* Try-except approach

* Add is_guild_integration and is_user_integration methods to Interaction class

* Fix incorrect index in is_user_integration method of Interaction class

* Refactor values for AppCommandContext and AppInstallationType

* Black formatting

* Fix docs for AppCommandContext in interactions.py

* Refactor typing imports in installs.py

* Add versionadded tags to new methods in Interaction class

* Fix incorrect indent in is_user_integration

* Add is_integration method to Interaction class

* Removed is_integration as it was a bug on discord's end
@Rapptz Rapptz merged commit 2e2f51f into master May 5, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants