Skip to content

Commit

Permalink
Add new permissions (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 authored and lukellmann committed Mar 31, 2023
1 parent af9300c commit 7ddd491
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
12 changes: 12 additions & 0 deletions common/api/common.api
Original file line number Diff line number Diff line change
Expand Up @@ -7540,6 +7540,10 @@ public final class dev/kord/common/entity/Permission$ManageGuild : dev/kord/comm
public static final field INSTANCE Ldev/kord/common/entity/Permission$ManageGuild;
}

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

public final class dev/kord/common/entity/Permission$ManageMessages : dev/kord/common/entity/Permission {
public static final field INSTANCE Ldev/kord/common/entity/Permission$ManageMessages;
}
Expand Down Expand Up @@ -7629,6 +7633,10 @@ public final class dev/kord/common/entity/Permission$UseExternalStickers : dev/k
public static final field INSTANCE Ldev/kord/common/entity/Permission$UseExternalStickers;
}

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

public final class dev/kord/common/entity/Permission$UseVAD : dev/kord/common/entity/Permission {
public static final field INSTANCE Ldev/kord/common/entity/Permission$UseVAD;
}
Expand All @@ -7641,6 +7649,10 @@ public final class dev/kord/common/entity/Permission$ViewChannel : dev/kord/comm
public static final field INSTANCE Ldev/kord/common/entity/Permission$ViewChannel;
}

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

public final class dev/kord/common/entity/Permission$ViewGuildInsights : dev/kord/common/entity/Permission {
public static final field INSTANCE Ldev/kord/common/entity/Permission$ViewGuildInsights;
}
Expand Down
16 changes: 14 additions & 2 deletions common/src/main/kotlin/entity/Permission.kt
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ public sealed class Permission(public val code: DiscordBitSet) {
public object ManageWebhooks : Permission(1L shl 29)

/** Allows management and editing of emojis and stickers. */
@Deprecated("Renamed by discord", ReplaceWith("ManageGuildExpressions"), DeprecationLevel.WARNING)
public object ManageEmojisAndStickers : Permission(1L shl 30)

/** Allows management and editing of emojis, stickers and soundboard sounds. */
public object ManageGuildExpressions : Permission(1L shl 30)

/** Allows members to use application commands, including slash commands and context menu commands. */
public object UseApplicationCommands : Permission(1L shl 31)

Expand Down Expand Up @@ -284,6 +288,12 @@ public sealed class Permission(public val code: DiscordBitSet) {
*/
public object ModerateMembers : Permission(1L shl 40)

/** Allows for viewing role subscription insights. */
public object ViewCreatorMonetizationAnalytics : Permission(1L shl 41)

/** Allows for using soundboard in a voice channel. */
public object UseSoundboard : Permission(1L shl 42)


/** All [Permission]s combined into one. */
public object All : Permission(buildAll())
Expand Down Expand Up @@ -326,7 +336,7 @@ public sealed class Permission(public val code: DiscordBitSet) {
ManageNicknames,
ManageRoles,
ManageWebhooks,
ManageEmojisAndStickers,
ManageGuildExpressions,
UseApplicationCommands,
RequestToSpeak,
ManageEvents,
Expand All @@ -336,7 +346,9 @@ public sealed class Permission(public val code: DiscordBitSet) {
UseExternalStickers,
SendMessagesInThreads,
UseEmbeddedActivities,
ModerateMembers
ModerateMembers,
ViewCreatorMonetizationAnalytics,
UseSoundboard
)
}
}

0 comments on commit 7ddd491

Please sign in to comment.