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(ext.bridge): add walk command functions & dynamically fetch attrs in commands variants #1867

Merged
merged 24 commits into from May 8, 2023

Conversation

Middledot
Copy link
Member

@Middledot Middledot commented Jan 11, 2023

Summary

Further explanations in the changelog.
Should fix #1840

EDIT: The translation attributes are unique to slash commands so if you "dynamically" set them:

  • all "dynamically" set attributes should only be set on the slash variant,
  • the translation attrs and other unique attrs should be set on both variants,
  • or there is no "dynamic" setting and we force people to directly set attrs on the variants.

So I kept the code for setting and fetching the translations.

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.

@Middledot Middledot requested review from a team as code owners January 11, 2023 03:35
@Lulalaby Lulalaby changed the title chore(ext.bridge): add walk command functions & dynamically fetch attrs in commands variants feat!(ext.bridge): add walk command functions & dynamically fetch attrs in commands variants Jan 11, 2023
Middledot and others added 2 commits January 10, 2023 22:47
Signed-off-by: Middledot <78228142+Middledot@users.noreply.github.com>
@JustaSqu1d JustaSqu1d added feature Implements a feature ext.bridge Relating to ext.bridge labels Jan 11, 2023
As mentioned in https://docs.python.org/3.11/library/typing.html#typing.Generator, the Iterable and Iterator types can also be used in generator functions
@BobDotCom BobDotCom changed the title feat!(ext.bridge): add walk command functions & dynamically fetch attrs in commands variants feat(ext.bridge): add walk command functions & dynamically fetch attrs in commands variants Jan 11, 2023
@Lulalaby Lulalaby requested review from Dorukyum and plun1331 and removed request for JustaSqu1d January 11, 2023 17:42
Middledot and others added 2 commits April 2, 2023 04:44
Signed-off-by: Middledot <78228142+Middledot@users.noreply.github.com>
@Middledot
Copy link
Member Author

After reviewing this, I don't remember why I said it depends on the other pr, so it can be reviewed and merged now

Copy link
Member

@BobDotCom BobDotCom left a comment

Choose a reason for hiding this comment

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

Please see previous comment and resolve merge conflicts.

Middledot and others added 2 commits April 28, 2023 22:16
Signed-off-by: Middledot <78228142+Middledot@users.noreply.github.com>
Lulalaby
Lulalaby previously approved these changes Apr 29, 2023
@Lulalaby
Copy link
Member

wait for bob to review tho

@Middledot
Copy link
Member Author

I updated the description explaining what I just did

@Lulalaby
Copy link
Member

Nom

Looks good

@Middledot Middledot marked this pull request as draft April 29, 2023 20:51
@Middledot Middledot marked this pull request as ready for review April 29, 2023 23:22
@UP929312
Copy link
Contributor

UP929312 commented May 4, 2023

@Lulalaby @BobDotCom Please review (then we can also get #1866 merged)

Lulalaby
Lulalaby previously approved these changes May 8, 2023
Signed-off-by: Lala Sabathil <lala@pycord.dev>
@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Merging #1867 (e90b094) into master (d519e95) will increase coverage by 0.02%.
The diff coverage is n/a.

❗ Current head e90b094 differs from pull request most recent head 96995fa. Consider uploading reports for the commit 96995fa to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1867      +/-   ##
==========================================
+ Coverage   33.23%   33.26%   +0.02%     
==========================================
  Files          97       97              
  Lines       19038    19021      -17     
==========================================
  Hits         6328     6328              
+ Misses      12710    12693      -17     
Flag Coverage Δ
macos-latest-3.10 33.25% <ø> (+0.02%) ⬆️
macos-latest-3.11 33.25% <ø> (+0.02%) ⬆️
macos-latest-3.8 33.26% <ø> (+0.02%) ⬆️
macos-latest-3.9 33.26% <ø> (+0.02%) ⬆️
ubuntu-latest-3.10 33.25% <ø> (+0.02%) ⬆️
ubuntu-latest-3.11 33.25% <ø> (+0.02%) ⬆️
ubuntu-latest-3.8 33.26% <ø> (+0.02%) ⬆️
ubuntu-latest-3.9 33.26% <ø> (+0.02%) ⬆️
windows-latest-3.10 33.25% <ø> (+0.02%) ⬆️
windows-latest-3.11 33.25% <ø> (+0.02%) ⬆️
windows-latest-3.8 33.26% <ø> (+0.02%) ⬆️
windows-latest-3.9 33.26% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d519e95...96995fa. Read the comment docs.

@Lulalaby Lulalaby merged commit c43727b into Pycord-Development:master May 8, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext.bridge Relating to ext.bridge feature Implements a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'BridgeCommand' object has no attribute 'hidden' when calling "filter_commands()"
6 participants