remove no alternatives found text

This commit is contained in:
Owen
2025-01-10 22:18:27 +01:00
parent f4c213e7b3
commit 71d728fb1a
+1 -3
View File
@@ -129,9 +129,7 @@ defmodule PlantIdDiscordBot.PlantNet.Parser do
end end
defp get_alternatives(data) do defp get_alternatives(data) do
if length(data) === 0 do if length(data) > 0 do
"\n\nNo alternatives found."
else
alternatives = alternatives =
Enum.map(data, & &1["species"]["scientificNameWithoutAuthor"]) Enum.map(data, & &1["species"]["scientificNameWithoutAuthor"])
|> Enum.join(", ") |> Enum.join(", ")