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 soundboard and monetization permissions #2620

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
✨ Add creator monetization analytics perms (1 << 41)
  • Loading branch information
Paillat-dev committed Oct 29, 2024
commit bfe61c8240e9be6c457675a6417719e22d5650ab
13 changes: 12 additions & 1 deletion discord/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def all_channel(cls: type[P]) -> P:
- :attr:`manage_emojis`
- :attr:`view_audit_log`
- :attr:`view_guild_insights`
- :attr:`view_creator_monetization_analytics`
- :attr:`manage_guild`
- :attr:`change_nickname`
- :attr:`manage_nicknames`
Expand Down Expand Up @@ -218,8 +219,10 @@ def general(cls: type[P]) -> P:
permissions :attr:`administrator`, :attr:`create_instant_invite`, :attr:`kick_members`,
:attr:`ban_members`, :attr:`change_nickname` and :attr:`manage_nicknames` are
no longer part of the general permissions.
.. versionchanged:: 2.7
Added :attr:`view_creator_monetization_analytics` permission.
"""
return cls(0b01110000000010000000010010110000)
return cls(0b100000000001110000000010000000010010110000)

@classmethod
def membership(cls: type[P]) -> P:
Expand Down Expand Up @@ -610,6 +613,14 @@ def moderate_members(self) -> int:
"""
return 1 << 40

@flag_value
def view_creator_monetization_analytics(self) -> int:
Lulalaby marked this conversation as resolved.
Show resolved Hide resolved
""":class:`bool`: Returns ``True`` if a user can view creator monetization (role subscription) analytics.

.. versionadded:: 2.7
"""
return 1 << 41

@flag_value
def use_soundboard(self) -> int:
""":class:`bool`: Returns ``True`` if a user can use the soundboard in a voice channel.
Expand Down