diff --git a/kord-extensions/build.gradle.kts b/kord-extensions/build.gradle.kts index c3d0b97499..c580c7562e 100644 --- a/kord-extensions/build.gradle.kts +++ b/kord-extensions/build.gradle.kts @@ -27,11 +27,7 @@ dependencies { api(libs.koin.core) api(libs.koin.logger) - api(libs.kord) { - capabilities { - requireCapability(libs.kord.voice.get().toString()) - } - } + api(libs.kord) api(libs.logging) // Basic logging setup api(libs.kx.ser) diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt index 6eedf69256..f8690d0d7a 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt @@ -31,6 +31,7 @@ import com.kotlindiscord.kord.extensions.utils.getKoin import com.kotlindiscord.kord.extensions.utils.loadModule import dev.kord.cache.api.DataCache import dev.kord.common.Color +import dev.kord.common.asJavaLocale import dev.kord.common.entity.PresenceStatus import dev.kord.common.entity.Snowflake import dev.kord.core.ClientResources @@ -40,6 +41,7 @@ import dev.kord.core.behavior.UserBehavior import dev.kord.core.behavior.channel.ChannelBehavior import dev.kord.core.builder.kord.KordBuilder import dev.kord.core.cache.KordCacheBuilder +import dev.kord.core.cache.lruCache import dev.kord.core.entity.interaction.Interaction import dev.kord.core.event.message.MessageCreateEvent import dev.kord.core.supplier.EntitySupplier diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommand.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommand.kt index 593cc657d7..ec7a5b9e26 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommand.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommand.kt @@ -17,6 +17,7 @@ import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.koin.KordExKoinComponent import com.kotlindiscord.kord.extensions.utils.MutableStringKeyedMap import com.kotlindiscord.kord.extensions.utils.getLocale +import dev.kord.common.asJavaLocale import dev.kord.common.entity.ApplicationCommandType import dev.kord.common.entity.Permission import dev.kord.common.entity.Permissions diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommandRegistry.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommandRegistry.kt index 71ed3ee797..c2d1464416 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommandRegistry.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/application/ApplicationCommandRegistry.kt @@ -28,6 +28,7 @@ import com.kotlindiscord.kord.extensions.i18n.TranslationsProvider import com.kotlindiscord.kord.extensions.koin.KordExKoinComponent import dev.kord.common.annotation.KordExperimental import dev.kord.common.annotation.KordUnsafe +import dev.kord.common.asJavaLocale import dev.kord.common.entity.ApplicationCommandType import dev.kord.common.entity.Choice import dev.kord.common.entity.Snowflake diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_ChannelType.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_ChannelType.kt index 2e8a6b2c00..b55f681fef 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_ChannelType.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_ChannelType.kt @@ -12,7 +12,6 @@ import dev.kord.common.entity.ChannelType import java.util.* /** Given a [ChannelType], return a string representing its translation key. **/ -@Suppress("DEPRECATION_ERROR") public fun ChannelType.toTranslationKey(): String = when (this) { ChannelType.DM -> "channelType.dm" ChannelType.GroupDM -> "channelType.groupDm" diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_Permissions.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_Permissions.kt index 560f32c445..939041cf86 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_Permissions.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/utils/_Permissions.kt @@ -25,7 +25,7 @@ public fun Permission.toTranslationKey(): String? = when (this) { Permission.EmbedLinks -> "permission.embedLinks" Permission.KickMembers -> "permission.kickMembers" Permission.ManageChannels -> "permission.manageChannels" - Permission.ManageEmojisAndStickers -> "permission.manageEmojisAndStickers" + Permission.ManageGuildExpressions, Permission.ManageEmojisAndStickers -> "permission.manageEmojisAndStickers" Permission.ManageEvents -> "permission.manageEvents" Permission.ManageGuild -> "permission.manageGuild" Permission.ManageMessages -> "permission.manageMessages" @@ -57,6 +57,8 @@ public fun Permission.toTranslationKey(): String? = when (this) { Permission.UseExternalStickers -> "permission.useExternalStickers" Permission.UseEmbeddedActivities -> "permission.useEmbeddedActivities" + Permission.ViewCreatorMonetizationAnalytics -> "permission.viewCreatorMonetizationAnalytics" + Permission.UseSoundboard -> "permission.useSoundboard" is Permission.Unknown -> null } diff --git a/kord-extensions/src/main/resources/translations/kordex/strings.properties b/kord-extensions/src/main/resources/translations/kordex/strings.properties index 0b408ebafa..8fe10cff3b 100644 --- a/kord-extensions/src/main/resources/translations/kordex/strings.properties +++ b/kord-extensions/src/main/resources/translations/kordex/strings.properties @@ -205,9 +205,11 @@ permission.useApplicationCommands=Use Application Commands permission.useEmbeddedActivities=Use Activities permission.useExternalEmojis=Use External Emojis permission.useExternalStickers=Use External Stickers +permission.useSoundboard=Use Soundboard permission.useVAD=Use Voice Activity permission.viewAuditLog=View Audit Log permission.viewChannel=View Channel +permission.viewCreatorMonetizationAnalytics=View Creator Monetization Analytics permission.viewGuildInsights=View Server Insights utils.message.useThisChannel=Please use {0} for this command. utils.message.commandNotAvailableInDm=This command is not available via private message. diff --git a/kord-extensions/src/main/resources/translations/kordex/strings_en_GB.properties b/kord-extensions/src/main/resources/translations/kordex/strings_en_GB.properties index 113823035e..45204b15dc 100644 --- a/kord-extensions/src/main/resources/translations/kordex/strings_en_GB.properties +++ b/kord-extensions/src/main/resources/translations/kordex/strings_en_GB.properties @@ -198,9 +198,11 @@ permission.useApplicationCommands=Use Application Commands permission.useEmbeddedActivities=Use Activities permission.useExternalEmojis=Use External Emojis permission.useExternalStickers=Use External Stickers +permission.useSoundboard=Use Soundboard permission.useVAD=Use Voice Activity permission.viewAuditLog=View Audit Log permission.viewChannel=View Channel +permission.viewCreatorMonetizationAnalytics=View Creator Monetization Analytics permission.viewGuildInsights=View Server Insights utils.message.useThisChannel=Please use {0} for this command. utils.message.commandNotAvailableInDm=This command is not available via private message. diff --git a/libs.versions.toml b/libs.versions.toml index 716db99b3c..d5424a87f5 100644 --- a/libs.versions.toml +++ b/libs.versions.toml @@ -42,8 +42,7 @@ koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin" } konf-core = { module = "com.uchuhimo:konf", version.ref = "konf" } konf-toml = { module = "com.uchuhimo:konf-toml", version.ref = "konf" } -kord = { module = "dev.kord:kord-core", version.ref = "kord" } -kord-voice = { module = "dev.kord:core-voice", version.ref = "kord" } +kord = { module = "dev.kord:kord-core-voice", version.ref = "kord" } kotlinpoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinpoet" } kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8" } diff --git a/test-bot/src/main/kotlin/com/kotlindiscord/kord/extensions/testbot/extensions/I18nTestExtension.kt b/test-bot/src/main/kotlin/com/kotlindiscord/kord/extensions/testbot/extensions/I18nTestExtension.kt index 0ee0176053..5a84036af0 100644 --- a/test-bot/src/main/kotlin/com/kotlindiscord/kord/extensions/testbot/extensions/I18nTestExtension.kt +++ b/test-bot/src/main/kotlin/com/kotlindiscord/kord/extensions/testbot/extensions/I18nTestExtension.kt @@ -19,6 +19,7 @@ import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand import com.kotlindiscord.kord.extensions.types.respond +import dev.kord.common.asJavaLocale import dev.kord.core.behavior.interaction.suggestString import dev.kord.core.event.interaction.ChatInputCommandInteractionCreateEvent