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
|
||||
|
||||
defp get_alternatives(data) do
|
||||
if length(data) === 0 do
|
||||
"\n\nNo alternatives found."
|
||||
else
|
||||
if length(data) > 0 do
|
||||
alternatives =
|
||||
Enum.map(data, & &1["species"]["scientificNameWithoutAuthor"])
|
||||
|> Enum.join(", ")
|
||||
|
||||
Reference in New Issue
Block a user