ChrisLGardner / Spellapi.Discord

Discord bot for interacting with the spellapi api
MIT License
0 stars 0 forks source link

Support Listing spells by System #15

Open michaeltlombardi opened 2 years ago

michaeltlombardi commented 2 years ago

It would be extremely useful to be able to list spells by system, like

?spells vanilla

Which would return only valid spell names for that system.

ChrisLGardner commented 2 years ago

It's sort of supported already if you do ?spell system=vanilla but it's a pretty awful UX as it'll spit out each spell as it's own card, fine for when you've only got one or two spells but really awful when you've got lots.

I could make some changes to the logic so that if it returns more than 2 or 3 spells then it'll just spit out a list of names in a single message rather than doing a card for each.

ChrisLGardner commented 2 years ago

This is mostly done now but is still a bit ugly. It'll return a code block with the list of spells and their system (in case someone searches by something other than system).

I've got pagination on the backlog for the API so once I add that I'll be able to return a more controlled amount back so the UX won't be just splatting a big list of text back to the client like it is now.