dronefly-garden / dronefly

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

taxon: should handle links to iNat /taxa pages #46

Closed synrg closed 3 years ago

synrg commented 5 years ago

The bot should handle taxon links.

e.g.

,taxon https://www.inaturalist.org/taxa/592102

Expected output, a summary of taxon_id = 592102, the same as:

,taxon 592102

image

synrg commented 3 years ago

Quite possibly nobody cared or cares about this one but me. It's a consistency thing ... But I coded it anyway and in doing so, moved some things into core (with more to come in successive revisions). URL parsing really should be a thing of its own, but currently is just a handful of regexes. Only the base pattern and the taxon one are moved into core.parsers.url for now, but later I'll put the rest in there and make it a bit more of a usable module than just a collection of regex constants. Stay tuned ...

Implemented in b107a7c89c920038726d53593eb281efa4556d8c