Skip to content

Commit

Permalink
fix: createSelectOption
Browse files Browse the repository at this point in the history
chore: 0.0.13_5.0.0-alpha.9
  • Loading branch information
itsmefox committed Apr 14, 2022
1 parent a96c986 commit d38c0b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group "io.viascom.discord.bot"
version "0.0.12_5.0.0-alpha.9"
version "0.0.13_5.0.0-alpha.9"

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down
8 changes: 4 additions & 4 deletions src/main/kotlin/io/viascom/discord/bot/starter/util/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ fun SelectMenuInteractionEvent.getSelections(): List<String> = this.values

fun EmbedBuilder.setColor(red: Int, green: Int, blue: Int): EmbedBuilder = this.setColor(Color(red, green, blue))
fun createSelectOption(label: String, value: String, description: String? = null, emoji: Emoji? = null, isDefault: Boolean? = null): SelectOption {
val option = SelectOption.of(label, value)
description?.let { option.withDescription(description) }
emoji?.let { option.withEmoji(emoji) }
isDefault?.let { option.withDefault(isDefault) }
var option = SelectOption.of(label, value)
description?.let { option = option.withDescription(description) }
emoji?.let { option = option.withEmoji(emoji) }
isDefault?.let { option = option.withDefault(isDefault) }

return option
}
Expand Down

0 comments on commit d38c0b8

Please sign in to comment.