coding-buddies-discord / cb-bots

4 stars 3 forks source link

new command: !poll #84

Open cubiquitous opened 1 year ago

cubiquitous commented 1 year ago

this issue is to discuss a possible new command !poll, the structure in the db and how it should be called.

the structure on the db should be this one:

{
 pollName: String,
 options: String[],
 votes: [{userID: String, vote: String}]
}

is quite simple. pollName is quite self-explanatory. options will have the possible vote options for that poll. In votes it'll have the userID and in votes which vote that user took. it will be necessary create a new collection. the name for that collection is very open, but polls or codding_buddies_polls are the most obvious to me.

the calling of the function is a bit more complex because it has the requirement to pass 2 info:

cubiquitous commented 1 year ago

just thought now, and I think that there should be a limit of options