Poll
Implementation of discords Poll object as a Luau builder.
https://discord.com/developers/docs/resources/poll#poll-object
Properties
The Poll instance has no set properties!
Methods
The Poll instance has no set methods!
Functions
addAnswer
Poll . addAnswer () -> ()
self: Poll
answer: answerBuilder.JSON
Adds an answer to the poll.
setQuestion
Poll . setQuestion () -> ()
self: Poll
question: mediaBuilder.JSON
Sets the question for the poll.
setExpiry
Poll . setExpiry () -> ()
self: Poll
expiry: string
| number
| stdPolyfills.DateTime
Sets the expiry time for the poll.
setMultiselect
Poll . setMultiselect () -> ()
self: Poll
multiselect: boolean
Sets whether the poll allows multiple selections.
setLayoutType
Poll . setLayoutType () -> ()
self: Poll
layoutType: apiTypes.PollLayoutType
Sets the layout type for the poll.
build
Poll . build () -> ()
self: Poll
Builds and returns the Poll JSON that can be parsed by the Discord API.
new
Responsible for creating a new Poll.