Skip to content

Commit

Permalink
Fix emoji converter throwing an error
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Nov 5, 2024
1 parent 205229a commit b95d561
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import dev.kordex.core.commands.converters.builders.ConverterBuilder
import dev.kordex.core.commands.converters.builders.OptionalCoalescingConverterBuilder
import dev.kordex.core.commands.converters.impl.emoji
import dev.kordex.core.commands.converters.impl.string
import dev.kordex.core.i18n.EMPTY_KEY
import dev.kordex.core.i18n.types.Key
import dev.kordex.modules.dev.unsafe.annotations.UnsafeAPI
import dev.kordex.modules.dev.unsafe.converters.union
Expand All @@ -37,7 +38,7 @@ fun Arguments.emoji(name: Key, description: Key): OptionalCoalescingConverter<An
}
}

val brokenConverter = union(name, description, converters = arrayOf(emoji, string))
val brokenConverter = union(name, description, typeName = EMPTY_KEY, converters = arrayOf(emoji, string))
args.removeIf { it.converter == brokenConverter }
return arg(name, description, brokenConverter.toOptional().withBuilder(DummyBuilder))
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

allprojects {
group = "dev.schlaubi.tonbrett"
version = "2.0.0"
version = "2.0.1"

repositories {
mavenCentral()
Expand Down

0 comments on commit b95d561

Please sign in to comment.