We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fe31c0 commit 37775f8Copy full SHA for 37775f8
bot/src/main/kotlin/ml/duncte123/skybot/commands/utils/EmoteCommand.kt
@@ -125,5 +125,5 @@ class EmoteCommand : Command() {
125
private fun Int.toHex() = Integer.toHexString(this).uppercase()
126
private fun Int.getName() = Character.getName(this)
127
private fun Char.toHex() = this.code.toHex()
128
- private fun String.ensureFourHex() = "0000$this".substring(this.length)
+ private fun String.ensureFourHex() = "0000$this".substring(this.length.coerceAtMost(4))
129
}
0 commit comments