Skip to content

Commit

Permalink
fix(definition): add uppercase D + 's' only if there's multiple defin…
Browse files Browse the repository at this point in the history
…itions
  • Loading branch information
LeRoiDesKiwis committed Jun 23, 2024
1 parent 29bdc61 commit 108c4e6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ public void execute(OmegaUser user, SlashCommandInteraction event) {

definitionsText.append("\nSee more [here](https://www.urbandictionary.com/define.php?term=").append(searchTerm).append(")");

String plurial = definitionsToDisplay > 1 ? "s" : "";

event.replyEmbeds(new EmbedBuilder()
.setTitle("définitions pour `" + searchTerm.replace("+", " ") + "`")
.setTitle("Définition%s pour \"%s\"".formatted(plurial, searchTerm.replace("+", " ")))
.setColor(Color.BLUE)
.setDescription(definitionsText.toString())
.build()).queue();
Expand Down

0 comments on commit 108c4e6

Please sign in to comment.