Fryyyyy / Fryatog

GoLang based IRC bot for looking up MTG Rules/Oracle
4 stars 3 forks source link

User menu if there are multiple possible cards found #23

Open Villawhatever opened 5 years ago

Villawhatever commented 5 years ago
<Volo> !ruin
t=2019-01-26T17:08:03-0600 lvl=dbug msg="In lookupUniqueNamePrefix" C="[Ruin Ghost Ruin Processor Ruin Raider Ruin Rat Ruin in Their Wake Ruination Ruination Guide Ruination Wurm Ruinous Gremlin Ruinous Minotaur Ruinous Path Ruins of Oran-Rief Ruins of Trokair]"

Currently a request like this just fizzles, because there's Too Much Stuff and none of them match the legendary-ish fuzziness.

Suggestion: add per-user menus if multiple things come back and we can't make a reasonable guess. Ex:

<Volo> teysa
-Datatog- 4 cards beginning with "teysa" found: (1) Teysa Karlov (2) Teysa, Envoy of Ghosts (3) Teysa, Orzhov Scion (4) Teysa, Orzhov Scion Avatar
Fryyyyy commented 5 years ago

I think rather than a "menu" just give them the list of matched cards (within reason)

petzku commented 5 years ago

I agree with Fry. Menus would make it easier for users to get the card they wanted, but would need state. Giving a list of possible matches seems reasonable with up to 10-20 cards (basically whatever fits in a single IRC message), or if it matches too many, maybe respond with "Query matches $number cards."