Skip to content

feat: Add helper methods to determine interactions integrations#2659

Merged
Lulalaby merged 19 commits into
Pycord-Development:masterfrom
DA-344:feat/interaction-integrations-methods
Dec 27, 2024
Merged

feat: Add helper methods to determine interactions integrations#2659
Lulalaby merged 19 commits into
Pycord-Development:masterfrom
DA-344:feat/interaction-integrations-methods

Conversation

@DA-344

@DA-344 DA-344 commented Nov 28, 2024

Copy link
Copy Markdown
Contributor

Summary

Adds Interaction.is_guild_integration and Interaction.is_user_integration to easily check whether an interaction has been invoked by a guild or user integration.

Also adds this to ApplicationContext.

Information

  • 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, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

Lulalaby
Lulalaby previously approved these changes Nov 28, 2024

@Lulalaby Lulalaby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good addition! 💕🎉

@Lulalaby
Lulalaby enabled auto-merge (squash) November 28, 2024 16:03
@Lulalaby
Lulalaby requested review from JustaSqu1d and plun1331 and removed request for VincentRPS November 28, 2024 16:03
@Lulalaby Lulalaby added the feature Implements a feature label Nov 28, 2024
@Lulalaby Lulalaby added this to the v2.7 milestone Nov 28, 2024

@Paillat-dev Paillat-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@JustaSqu1d JustaSqu1d left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

minor convention and grammar

Comment thread discord/commands/context.py Outdated
Comment thread discord/interactions.py Outdated
Comment thread CHANGELOG.md Outdated
Co-authored-by: JustaSqu1d <[email protected]>
Signed-off-by: DA344 <[email protected]>
auto-merge was automatically disabled December 10, 2024 07:44

Head branch was pushed to by a user without write access

@JustaSqu1d
JustaSqu1d requested a review from Lulalaby December 10, 2024 07:44
DA-344 and others added 2 commits December 10, 2024 08:46
Co-authored-by: JustaSqu1d <[email protected]>
Signed-off-by: DA344 <[email protected]>
Co-authored-by: JustaSqu1d <[email protected]>
Signed-off-by: DA344 <[email protected]>

@JustaSqu1d JustaSqu1d left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't quite like the naming. Interactions aren't exactly integrations.

Could we change it from is_x_integration to is_x_authorized?

Or if you have a better name that we could go with.

@DA-344

DA-344 commented Dec 15, 2024

Copy link
Copy Markdown
Contributor Author

I don't quite like the naming. Interactions aren't exactly integrations.

Yeah, but when invoking an application command, you are using an integration, which can either be guild or user installed.

Could we change it from is_x_integration to is_x_authorized?

Or if you have a better name that we could go with.

I think the current naming is nice, but if it is really neccesary I can change it to is_x_authorized.

@Paillat-dev

Copy link
Copy Markdown
Member

I feel like both namings make sense, maybe is_x_authorized is more explicit since that is in fact what is being checked.

dependabot Bot and others added 2 commits December 21, 2024 00:44
…ycord-Development#2676)

Updates the requirements on [mypy](https://github.com/python/mypy) to permit the latest version.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Comment thread CHANGELOG.md Outdated
Signed-off-by: plun1331 <[email protected]>
@plun1331
plun1331 enabled auto-merge (squash) December 26, 2024 18:26
plun1331
plun1331 previously approved these changes Dec 26, 2024

@JustaSqu1d JustaSqu1d left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For some reason changelog is en-US.

Comment thread CHANGELOG.md Outdated
auto-merge was automatically disabled December 27, 2024 08:41

Head branch was pushed to by a user without write access

@Lulalaby Lulalaby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we really should stop doing american / british english

@Lulalaby
Lulalaby merged commit 9fa5cbe into Pycord-Development:master Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Implements a feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants