mirror of
https://github.com/TheRealOwenRees/plantid-discord-bot.git
synced 2026-07-23 04:26:57 +00:00
remove no alternatives found text
This commit is contained in:
@@ -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(", ")
|
||||||
|
|||||||
Reference in New Issue
Block a user