PollAnswer
Implementation of discords PollAnswer object as a Luau builder.
https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure
Properties
The PollAnswer instance has no set properties!
Methods
The PollAnswer instance has no set methods!
Functions
setId
PollAnswer . setId () -> ()
self: PollAnswer
id: number
Sets the ID for the poll answer.
setMedia
PollAnswer . setMedia () -> ()
self: PollAnswer
media: mediaBuilder.JSON
Sets the media for the poll answer.
build
PollAnswer . build () -> ()
self: PollAnswer
Responsible for building the PollAnswer JSON that can be parsed by the Discord API.
new
Responsible for creating a new PollAnswer.
local answer = PollAnswer.new({ answerId = 1, pollMedia = media:build()})