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: ✨ Add missing feature flags to Guild.edit #2672

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Paillat-dev
Copy link
Contributor

@Paillat-dev Paillat-dev commented Dec 17, 2024

Summary

https://discord.com/developers/docs/resources/guild#guild-object-guild-features
and also
https://discord.com/channels/881207955029110855/881224361015672863/1318631076209491968

This also fixes an issue where one could not edit the state of both the COMMUNITY and INVITES_DISABLED flags at once.

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.

@Paillat-dev Paillat-dev changed the title ✨ Add missing Guild feature flags feat: ✨ Add missing Guild feature flags Dec 17, 2024
@JustaSqu1d
Copy link
Member

I thought we stopped maintaining guild.features.

@Paillat-dev
Copy link
Contributor Author

Oh. I didn't know that. Lala just told me I could do it But I'm interested in knowing why this wouldn't be supported by pycord anymore - it's part of the api after all.

@JustaSqu1d
Copy link
Member

Oh. I didn't know that. Lala just told me I could do it But I'm interested in knowing why this wouldn't be supported by pycord anymore - it's part of the api after all.

We'd be adding a new feature flag like every week. Most feature flags aren't really even used.

@Paillat-dev
Copy link
Contributor Author

This pr focuses on adding toggle in Guild.edit for feature flags that can be edited. It does not add feature flags to the list. Maybe my pr title is misleading ?

* 👽 Update base max filesize to `10` Mb

* 📝 CHANGELOG.md
discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
@Paillat-dev Paillat-dev requested a review from Dorukyum December 26, 2024 22:20
@Paillat-dev Paillat-dev changed the title feat: ✨ Add missing Guild feature flags feat: ✨ Add missing feature flags to Guild.edit Dec 26, 2024
discord/guild.py Outdated Show resolved Hide resolved
@Paillat-dev Paillat-dev requested a review from Dorukyum January 2, 2025 14:36
@Dorukyum
Copy link
Member

Dorukyum commented Jan 2, 2025

  1. I've removed the variable and added a comparison between the new list of features and the old one instead. Tested, works.

  2. I realised the new parameter for feature RAID_ALERTS_DISABLED is called raid_alerts without a verb but for INVITES_DISABLED we have disable_invites. Therefore I suggest replacing raid_alerts with disable_raid_alerts.

  3. Here, one of ACTIVITY_FEED_ENABLED_BY_USER and ACTIVITY_FEED_DISABLED_BY_USER always gets added no matter the value of enable_activity_feed. Could a user not want to remove both? I really don't know whether that's an option. Also this is the only parameter called enable. Maybe keep but add disable_activity_feed?

@Lulalaby
Copy link
Member

Lulalaby commented Jan 2, 2025

activity feed is an opt-in thing, hence it has an enable flag

@Paillat-dev
Copy link
Contributor Author

  1. Ok
  2. I can take a look and see if I can make it more consistent.
  3. They both toggle the same thing. Idk why there are two flags, probably discord wanted to "enable it" for all guilds without having to add a flag to each and every guild so the default when none of the two flags are present is to be enabled. Honestly idk that's just how it's implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants