dronefly-garden / dronefly

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

search: report keywords used in query if it failed #125

Closed synrg closed 4 years ago

synrg commented 4 years ago

If a [p]search produces no results when the user typed by me or by <user>, etc. then it would be reasonable if the error response gave the user some guidance as to what command they probably intended. We do something similar here already:

image

The difference with [p]search is that the taxon query converter isn't used here (i.e. that only applies to the taxon, obs, and inactive subcommands), so there is no opportunity to immediately discover the issue. It might be good to change that for consistency's sake. Alternatively, we could check for keywords only after a query failed to produce any results, though that doesn't seem very consistent to me, so I slightly prefer the first approach.

synrg commented 4 years ago

Not worth it to actually parse the query to find out what they did wrong. Instead, I have beefed up the help and the error message text. See b0f4358486e09770085c6ea1c52aa5ae05a1ac35 for details.