Skip to content

Commit

Permalink
feat: User flag ACTIVE_DEVELOPER (#1776)
Browse files Browse the repository at this point in the history
* feat: User flag 1<<22

* Link to support article
  • Loading branch information
Lulalaby committed Nov 10, 2022
1 parent df85b81 commit 082f911
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ These changes are available on the `master` branch, but have not yet been releas
([#1702](https://github.com/Pycord-Development/pycord/pull/1702))
- Added support for age-restricted (NSFW) commands.
([#1775](https://github.com/Pycord-Development/pycord/pull/1775))
- New flags: `PublicUserFlags.active_developer` & `ApplicationFlags.active`.
([#1776](https://github.com/Pycord-Development/pycord/pull/1776))

### Fixed

Expand Down
1 change: 1 addition & 0 deletions discord/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ class UserFlags(Enum):
discord_certified_moderator = 262144
bot_http_interactions = 524288
spammer = 1048576
active_developer = 4194304


class ActivityType(Enum):
Expand Down
17 changes: 17 additions & 0 deletions discord/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,14 @@ def bot_http_interactions(self):
"""
return UserFlags.bot_http_interactions.value

@flag_value
def active_developer(self):
""":class:`bool`: Returns ``True`` if the user is an Active Developer.
.. versionadded:: 2.3
"""
return UserFlags.active_developer.value

def all(self) -> list[UserFlags]:
"""List[:class:`UserFlags`]: Returns all public flags the user has."""
return [
Expand Down Expand Up @@ -1374,6 +1382,15 @@ def app_commands_badge(self):
"""
return 1 << 23

@flag_value
def active(self):
""":class:`bool`: Returns ``True`` if the app is considered active.
Applications are considered active if they have had any command executions in the past 30 days.
.. versionadded:: 2.3
"""
return 1 << 24


@fill_with_flags()
class ChannelFlags(BaseFlags):
Expand Down

0 comments on commit 082f911

Please sign in to comment.