ruby-rbot/rbot

No exact matches found for <invalid word> when rbot's oxford command can't find its definition.

Closed this issue · 1 comments

...
[02:40pm] Ant> flexo oxford Acerbitude
02:40PM Flexo> Ant: error accessing lexico url -> https://www.lexico.com/definition/Acerbitude
[02:40pm] Ant> wtf??????????
[02:40pm] Ant> ooooooooh
[02:40pm] Ant> "No exact matches found for "acerbitude""
[02:40pm] Ant> bug
[02:40pm] Ant> @Oxford ant
02:40PM Flexo> Ant: noun A small insect typically having a sting and living in a complex social
colony with one or more breeding queens. It is wingless except for fertile adults,
which form large mating swarms, and is proverbial for its industriousness. Family
Formicidae, order Hymenoptera: several subfamilies More example sentences ‘The next
time either of those two ants meet any other ant, the information they pass on will be
different.’ ‘To scientis
[02:40pm] Ant> @Oxford ant9g8954gh549gh8565
[02:41pm] Ant> My password. :LP
[02:41pm] Ant> -L
02:41PM Flexo> Ant: error accessing lexico url ->
https://www.lexico.com/definition/ant9g8954gh549gh8565
[02:41pm] Ant> buuuuuuuuuuuuuuuuuuuuuuug
...

It shouldn't show "error accessing lexico url -> https://www.lexico.com/definition/...", but it should say "No exact matches found for '...'".

Should be fixed now, it will first attempt to find an exact match and then return the closest lexico.com could find, which at least sometimes is useful:

.oxford Acerbitude
<rbot> apoc: did you mean: acerbity? <rbot> apoc: noun Sharpness and directness in speech. ‘their relationship was built on a certain mutual acerbity’ ‘exuberance sharpened by blunt wit and acerbity’

.oxford figutively
<rbot> apoc: did you mean: figuratively? <rbot> apoc: adverb 1 Used to indicate a departure from a literal use of words; metaphorically. ‘we left a lot of people literally and figuratively in the dark’ sentence adverb ‘I did bump into— figuratively speaking—quite a few interesting people’ More example sentences ‘His film nails the primal horror of not knowing what's beneath the surface—literally and figuratively.’ ‘The curators have figuratively thrown open the doo