fsu-fall2022-capstone / Project-Group-5

A discord bot that connects to the online game nationstates
1 stars 0 forks source link

Redo shards to be a hash of choices #26

Closed CoderJoshDK closed 1 year ago

CoderJoshDK commented 1 year ago

Change for UI purposes

Right now the shards are stored in a tuple. It should be a dictionary so the names can be more descriptive. Most are self-explanatory, but some are not. May as well make them more descriptive. But the actual values must remain the same; that is how to interact with the API

shard = (
    "tgcanrecruit",
    "tgcancampaign",
    "type",
    "wa",
    "wabadges",
    "wcensus"
)

Instead, the options should be denoted by the discord choice option. We already do app_commands.Choice(name=valid, value=valid) but it should be rewritten to have a more descriptive name parameter.

CoderJoshDK commented 1 year ago

A good idea in theory, but explaining the shards further with more descriptive names does not help and causes a few issues with auto-complete. Autocomplete needs to be responded to quickly or else it causes an error. But also, input is still accepted even if it is not in the autocomplete list. Meaning too many bugs can be caused by quick users who don't know the backend code. With that in mind, it is better to have the shards slightly harder to intuitively understand, if it means fewer errors will be generated. Because people can learn what something stands for. But they won't stand for buggy interactions.