EasyPoll
I have created another module, this module allows you to easily create polls without the hassle of datastore. Through my module you can use various functions to create polls, vote on them, and get their data! Below is documentation for the module! Please reply below to help me make my documentation better!
Take the module here
Documentation
Name | Description |
---|---|
question | This is the “Topic” of the poll that you want to be the main part of the poll. |
choice | This is the “response” to the poll’s question that you can use to vote, and get data on. |
Functions:
Function | Parameters | Response | Example |
---|---|---|---|
EasyPoll.CreatePoll(STRING question, ARRAY choice) | question is as defined above, while choices are the questions you want. | returns the object of the poll. | EasyPoll.CreatePoll(“How are you today?”, “Great”, “Good”, “Neutral”, “Not Good”, “Horrible” |
EasyPoll.GetPoll(STRING question) | question is as defined above. | returns the object of the poll. | EasyPoll.GetPoll(“How are you today?”) |
Poll:Vote(STRING choice) | the choice of that question that will be voted on. | returns a boolean if the vote was successful | Poll:Vote(“Good”) |
Polls:GetPollData() | No Parameters | returns a table of the data, listed below. | Polls:GetPollData() |
Polls:GetChoices() | No Parameters | returns a table of only just the responses | Polls:GetChoices() |
Table:
Polls:GetPollData() table:
{
["Question"] = "This is the Question",
["Choices"] = {
["Choice"] = 7,
["Choice2"] = 6,
},
["TotalChoices"] = 13
}
Polls:GetChoices() table:
{
["Choice"] = 7,
["Choice2"] = 6,
}
I’m not sure what else to add to this but let me know if you want anything else. Also let me know what features you want to this!
Update Log
- 4/20/19 - Fixed bug with creation of a poll automatically setting Total Choices to 20