evaera / Votum

A Discord bot for managing small party voting systems
https://eryn.io/Votum
MIT License
26 stars 14 forks source link

Ability to Add and Remove Users from Weighted Voting by Command #42

Closed stephenmonk closed 3 years ago

stephenmonk commented 4 years ago

It would be really nice if we could add a new user to the Weighting by command. (!config add.weight 2312931929321912 3) and remove them from the Weighting in similar fashion !config remove.weight 12312312312312)

Where %1 is the userid and %2 is the vote total.

That will mean we can script that process more easily and removes the headache of maintaining a JSON file.

evaera commented 4 years ago

This should be a lot easier with the web panel. I agree that maintaining the json file is less than ideal

stephenmonk commented 3 years ago

Is it possible to do in the interim via command? Just parse the JSON field to see if userid is already there and then update, and if not there tag on to the end? And for remove just find all iterations of the userid and remove. Obvious not as clean as a nice web interface but eliminates potential errors with passing a long json string in.

evaera commented 3 years ago

possible yeah, but I would make it a different command since !config is purely for get/set of static values. Wouldn't want to add custom behavior there

stephenmonk commented 3 years ago

Sounds good. Are the vote weights per council?

evaera commented 3 years ago

Yes, they are