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

Allow changing guild features (community, etc.) #1828

Merged
merged 6 commits into from
Feb 21, 2024
Merged

Allow changing guild features (community, etc.) #1828

merged 6 commits into from
Feb 21, 2024

Conversation

PythonTryHard
Copy link
Contributor

Summary

This PR adds two missing mutable guild features to GuildFeature enums, introduces MutableGuildFeature for ease of use, and a features argument to edit_guild() to address the lack of support for editing guild features. Relevant docstrings and tests had been updated accordingly.

Checklist

  • I have run nox and all the pipelines have passed.
  • I have made unittests according to the code I have added/modified/deleted.

Related issues

Resolves #1768.
Partially addresses #1827.

- Add MutableGuildFeature for features that could be changed instead
  of relying on library users to look up the official docs
- Add corresponding arguments in edit_guild()-s
- Update relevant docstrings and tests
Copy link
Member

@davfsa davfsa left a comment

Choose a reason for hiding this comment

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

Overall, great pr, thanks!!

Just opened some talking points to decide how we proceed

hikari/guilds.py Outdated Show resolved Hide resolved
hikari/impl/rest.py Outdated Show resolved Hide resolved
This is for:
- Consistency: Hikari's approach is "generally not enforcing what can
               and can't be passed". `MutableGuildFeature` goes against
               such approach.
- Maintenance: `MutableGuildFeature` means constantly babysitting the
               official API for changes to what is and isn't mutable,
               generating additional workload.
hikari/impl/rest.py Outdated Show resolved Hide resolved
@davfsa davfsa enabled auto-merge (squash) February 21, 2024 05:42
@davfsa davfsa merged commit 6f6f82f into hikari-py:master Feb 21, 2024
25 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.

Support editing community features in edit_guild endpoint
3 participants