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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: red <red@kalab.sk> Co-authored-by: Vioshim <63890837+Vioshim@users.noreply.github.com>
Rapptz
force-pushed
the
feature/user_apps
branch
from
March 22, 2024 03:12
c0f58a1
to
fe165b3
Compare
Rapptz
force-pushed
the
feature/user_apps
branch
from
March 22, 2024 03:18
fe165b3
to
0a0d81d
Compare
Rapptz
force-pushed
the
feature/user_apps
branch
from
March 28, 2024 18:11
c23dc44
to
ff07ad0
Compare
13 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.AppIntegrationType
as a type feels wrong. It should probably be an enum or renamed toAppInstallationType
since that's.. what it is. The original naming feels like a misstep on Discord's side.AppContextType
is anArrayFlags
currently but due to a losing battle discussing this with them I think this might be better off as anEnum
instead.install_types
/user_install
/guild_install
but the inner types and properties are calledintegration_types
. Again, this feels like a misstep on Discord's side.channel.permissions_for
code that people have littered around.interaction_metadata
type needs to be added toMessage
AppInfo
need to be added as well.