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

Add Permission.CreateGuildExpressions and Permission.CreateEvents #892

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions common/api/common.api
Original file line number Diff line number Diff line change
Expand Up @@ -7897,6 +7897,14 @@ public final class dev/kord/common/entity/Permission$Connect : dev/kord/common/e
public static final field INSTANCE Ldev/kord/common/entity/Permission$Connect;
}

public final class dev/kord/common/entity/Permission$CreateEvents : dev/kord/common/entity/Permission {
public static final field INSTANCE Ldev/kord/common/entity/Permission$CreateEvents;
}

public final class dev/kord/common/entity/Permission$CreateGuildExpressions : dev/kord/common/entity/Permission {
public static final field INSTANCE Ldev/kord/common/entity/Permission$CreateGuildExpressions;
}

public final class dev/kord/common/entity/Permission$CreateInstantInvite : dev/kord/common/entity/Permission {
public static final field INSTANCE Ldev/kord/common/entity/Permission$CreateInstantInvite;
}
Expand Down
23 changes: 19 additions & 4 deletions common/src/commonMain/kotlin/entity/Permission.kt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public sealed class Permission {
public object ManageWebhooks : Permission(29)

/**
* Allows management and editing of emojis, stickers, and soundboard sounds.
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users.
*/
public object ManageGuildExpressions : Permission(30)

Expand All @@ -292,7 +292,7 @@ public sealed class Permission {
public object RequestToSpeak : Permission(32)

/**
* Allows for creating, editing, and deleting scheduled events.
* Allows for editing and deleting scheduled events created by all users.
*/
public object ManageEvents : Permission(33)

Expand Down Expand Up @@ -343,6 +343,18 @@ public sealed class Permission {
*/
public object UseSoundboard : Permission(42)

/**
* Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those
* created by the current user.
*/
public object CreateGuildExpressions : Permission(43)

/**
* Allows for creating scheduled events, and editing and deleting those created by the current
* user.
*/
public object CreateEvents : Permission(44)

/**
* Allows the usage of custom soundboard sounds from other servers.
*/
Expand Down Expand Up @@ -411,6 +423,8 @@ public sealed class Permission {
ModerateMembers,
ViewCreatorMonetizationAnalytics,
UseSoundboard,
CreateGuildExpressions,
CreateEvents,
UseExternalSounds,
SendVoiceMessages,
)
Expand Down Expand Up @@ -475,6 +489,8 @@ public sealed class Permission {
40 -> ModerateMembers
41 -> ViewCreatorMonetizationAnalytics
42 -> UseSoundboard
43 -> CreateGuildExpressions
44 -> CreateEvents
45 -> UseExternalSounds
46 -> SendVoiceMessages
else -> Unknown(shift)
Expand Down Expand Up @@ -528,8 +544,7 @@ public sealed class Permission {
* specific [Permission]s:
* ```kotlin
* val hasPermission = Permission.CreateInstantInvite in permissions
* val hasPermissions = Permissions(Permission.CreateInstantInvite,
* Permission.KickMembers) in permissions
* val hasPermissions = Permissions(Permission.CreateInstantInvite, Permission.KickMembers) in permissions
* ```
*
* ## Unknown [Permission]s
Expand Down
16 changes: 14 additions & 2 deletions common/src/commonMain/kotlin/entity/Permissions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Entry("ManageWebhooks", shift = 29, kDoc = "Allows management and editing of webhooks."),
Entry(
"ManageGuildExpressions", shift = 30,
kDoc = "Allows management and editing of emojis, stickers, and soundboard sounds.",
kDoc = "Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users.",
),
Entry(
"UseApplicationCommands", shift = 31,
Expand All @@ -58,7 +58,10 @@
kDoc = "Allows for requesting to speak in stage channels.\n\n" +
"_This permission is under active development and may be changed or removed._",
),
Entry("ManageEvents", shift = 33, kDoc = "Allows for creating, editing, and deleting scheduled events."),
Entry(
"ManageEvents", shift = 33,
kDoc = "Allows for editing and deleting scheduled events created by all users.",
),
Entry(
"ManageThreads", shift = 34,
kDoc = "Allows for deleting and archiving threads, and viewing all private threads.",
Expand All @@ -79,6 +82,15 @@
),
Entry("ViewCreatorMonetizationAnalytics", shift = 41, kDoc = "Allows for viewing role subscription insights."),
Entry("UseSoundboard", shift = 42, kDoc = "Allows for using soundboard in a voice channel."),
Entry(
"CreateGuildExpressions", shift = 43,
kDoc = "Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those " +
"created by the current user."
),
Entry(
"CreateEvents", shift = 44,
kDoc = "Allows for creating scheduled events, and editing and deleting those created by the current user.",
),
Entry(
"UseExternalSounds", shift = 45,
kDoc = "Allows the usage of custom soundboard sounds from other servers."
Expand Down