dronefly-garden / dronefly

Red Discord Bot V3 cogs for naturalists.
Other
16 stars 3 forks source link

taxon: match taxon of last observation in channel #25

Closed synrg closed 4 years ago

synrg commented 5 years ago

Extend the query language to include a last qualifier to match the taxon of any http{s}://{www.}inaturalist(.org|.ca)/observations/# URL recently mentioned in channel. It could support by [user] to filter on the last observation mentioned by the specified Discord user (without @ so they're not pinged) or my last (equivalent last by me) to reference the requesting user's last observation mentioned. Finally, some qualifiers to skip over most recent would be good, e.g. [ordinal] last to count backwards from current, e.g. 2nd last, my 2nd last, or their / by them to skip requesting user's own. Perhaps if an ordinal is given, the actual last keyword could be optional. Support browsing higher in the taxonomy tree to link to an ancestor (e.g. [p]taxon last genus would show the genus matching the last observation or, [p]taxon last parent would show the immediate ancestor of the last observation). Again, the keyword last might be omitted if there is nothing in the query but a rank that is an ancestor of the last observation (instead of the usual "I don't understand"), e.g. [p]taxon family where "of the last observation" is implied.

Consider if last should include other taxon queries, e.g. someone types [p]taxon zono to match Zonotrichia and then [p]taxon last parent, or again with optional last understood by context, [p]taxon parent to show its immediate ancestor to family Passerellidae (New World Sparrows).

synrg commented 5 years ago

To avoid cluttering the channel, if last refers to a previous taxon result that was made by the requesting user, it should by default replace the previous embed.

synrg commented 4 years ago

We went a different way with this, providing numerous subcommands of last to give equivalent functionality. parent is a completely different thing that belongs to a different issue. 2nd last is a concept we discussed and don't want to support (i.e. too confusing / no demand for it).