Skip to content

Commit

Permalink
Add CREATE_EVENTS permission (#1154)
Browse files Browse the repository at this point in the history
* Add permission CREATE_EVENTS

* Docs: Add permission CREATE_EVENTS

* typo

* Fix bitwise and reorder

* Update ChannelPermission.php

* Update RolePermission.php

---------

Co-authored-by: SQKo <[email protected]>
  • Loading branch information
jocafamaka and SQKo authored Mar 3, 2024
1 parent 0f32038 commit 6b8bbb1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/src/pages/api/07_permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Represents permissions for text, voice, and stage instance channels.
- `move_members`
- `use_vad`
- `manage_events`
- `create_events`
- `use_embedded_activities` was `start_embedded_activities`

#### Stage Instance Channel Permissions
Expand All @@ -86,6 +87,7 @@ Represents permissions for text, voice, and stage instance channels.
- `move_members`
- `request_to_speak`
- `manage_events`
- `create_events`

### Role Permissions

Expand Down
2 changes: 2 additions & 0 deletions guide/permissions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Voice Channel Permissions
- ``move_members``
- ``use_vad``
- ``manage_events``
- ``create_events``
- ``use_embedded_activities`` was ``start_embedded_activities``

Stage Instance Channel Permissions
Expand All @@ -96,6 +97,7 @@ Stage Instance Channel Permissions
- ``move_members``
- ``request_to_speak``
- ``manage_events``
- ``create_events``

Role Permissions
================
Expand Down
3 changes: 2 additions & 1 deletion src/Discord/Parts/Permissions/ChannelPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
* @property bool $move_members Allows for moving of members between voice channels
* @property bool $use_vad Allows for using voice-activity-detection in a voice channel
* @property bool $request_to_speak Allows for requesting to speak in stage channels. (*This permission is under active development and may be changed or removed.*)
* @property bool $manage_events Allows for creating, editing, and deleting scheduled events
* @property bool $manage_events Allows for editing and deleting scheduled events
* @property bool $manage_threads Allows for deleting and archiving threads, and viewing all private threads
* @property bool $create_public_threads Allows for creating public and announcement threads
* @property bool $create_private_threads Allows for creating private threads
* @property bool $send_messages_in_threads Allows for sending messages in threads
* @property bool $use_embedded_activities Allows for using Activities (applications with the `EMBEDDED` flag) in a voice channel
* @property bool $use_soundboard Allows for using soundboard in a voice channel
* @property bool $create_events Allows for creating scheduled events
* @property bool $use_external_sounds Allows the usage of custom soundboard sounds from other servers
*/
class ChannelPermission extends Permission
Expand Down
2 changes: 2 additions & 0 deletions src/Discord/Parts/Permissions/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ abstract class Permission extends Part
'manage_events' => 33,
'use_embedded_activities' => 39,
'use_soundboard' => 42,
'create_events' => 44,
'use_external_sounds' => 45,
];

Expand All @@ -101,6 +102,7 @@ abstract class Permission extends Part
'move_members' => 24,
'request_to_speak' => 32,
'manage_events' => 33,
'create_events' => 44,
];

/**
Expand Down
1 change: 1 addition & 0 deletions src/Discord/Parts/Permissions/RolePermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* @property bool $send_messages_in_threads
* @property bool $use_embedded_activities
* @property bool $use_soundboard
* @property bool $create_events
* @property bool $use_external_sounds
*/
class RolePermission extends Permission
Expand Down

0 comments on commit 6b8bbb1

Please sign in to comment.