JohnnyJayJay / instant-poll

A Discord bot that lets you create polls in your server
MIT License
42 stars 9 forks source link

Make length constraints for arguments dynamic and max key length/key separator configurable #7

Closed JohnnyJayJay closed 2 years ago

JohnnyJayJay commented 3 years ago

Currently, constraints like "a question must only have up to n characters" are fixed and hard coded. This is a problem because:

I therefore suggest that the lengths of the settings for each command invocation are summed and added to a constant (how much space the additional message parts like the bar chart will need) and if that exceeds the maximum character limit, reject the command.

Furthermore, the max option key length and key separator should be made configurable through config.edn, because both are currently not optimal and I would like to experiment with them to find the best settings.