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
Next Next commit
✨ Soundboard perms (1 << 42, 1 << 45)
  • Loading branch information
Paillat-dev committed Oct 29, 2024
commit 1575cb41bd6c50e4c30a16dfede116861e38d278
20 changes: 19 additions & 1 deletion discord/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def voice(cls: type[P]) -> P:
"""A factory method that creates a :class:`Permissions` with all
"Voice" permissions from the official Discord UI set to ``True``.
"""
return cls(0b1000000001000000000000011111100000000001100000000)
return cls(0b1001001001000000000000011111100000000001100000000)

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

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

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

@flag_value
def use_external_sounds(self) -> int:
""":class:`bool`: Returns ``True`` if a user can use external soundboard sounds in a voice channel.

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

@flag_value
def send_voice_messages(self) -> int:
""":class:`bool`: Returns ``True`` if a member can send voice messages.
Expand Down Expand Up @@ -762,6 +778,8 @@ class PermissionOverwrite:
use_external_stickers: bool | None
start_embedded_activities: bool | None
moderate_members: bool | None
use_soundboard: bool | None
use_external_sounds: bool | None
send_voice_messages: bool | None
set_voice_channel_status: bool | None
send_polls: bool | None
Expand Down