Feature/diseases (#19)

* add disease photo options

* basic disease application command, no real parsing other than map to string
This commit is contained in:
2025-12-08 16:32:16 +01:00
committed by GitHub
parent 3e6116423a
commit 9aa41d29f6
4 changed files with 82 additions and 10 deletions
+12
View File
@@ -30,6 +30,18 @@ defmodule PlantIdDiscordBot.PlantNet.Parser do
@powo_base_url "https://powo.science.kew.org/taxon"
@score_threshold Application.compile_env(:plantid_discord_bot, :score_threshold)
def parse_disease_response(response) do
response
|> to_map!()
|> filter_by_score()
|> generate_disease_response_message()
end
def generate_disease_response_message(data) do
data
|> to_string()
end
@doc """
Parses the response from the PlantNet API into a map.
"""