beanc16 / roll-of-darkness-bot

A discord bot for rolling dice in the New World of Darkness, Pokemon Tabletop United, and Curseborne tabletop systems
1 stars 0 forks source link

Create a strategy-ish pattern architecture for `/ptu` autocompletes #11

Open beanc16 opened 1 day ago

beanc16 commented 1 day ago

Currently, command execution for all /ptu subcommands is handled with a strategy-ish pattern (a handler map / an object with handler functions indexed by enum strings, abstracted behind a class that takes the enum key(s) as input). This same pattern should be created for autocompletion for the /ptu command in a way that keeps the "strategies" separate from the command execution strategies (or includes them with the relevant strategies as a separate method).

Once this is done, evaluate whether or not a separate issue should be made for other autocomplete commands, or if they can be done small enough that they can be batched together with this issue.