LogoAntiRaid

@discord-types/builders/message/poll/answer

API reference for @discord-types/builders/message/poll/answer

@discord-types/builders/message/poll/answer

Types

PollAnswer

Raw Type
type PollAnswer = PollAnswer.Prototype, & {
	answerId: number?,

	pollMedia: mediaBuilder.JSON?
}

Intersection with variants:

Variant 2
PropTypeDescription
answerId?
-
pollMedia?
-

JSON

Raw Type
type JSON = PollAnswer.Prototype.build(nil :: any),

Functions

PollAnswer.Prototype.setId

[[ Sets the ID for the poll answer. ]]

Function Signature
--[[
	Sets the ID for the poll answer.
]]
function PollAnswer.Prototype.setId(self: PollAnswer, id: number) -> PollAnswer end

Arguments

id

number

Returns

ret1

PollAnswer

PollAnswer.Prototype.setMedia

[[ Sets the media for the poll answer. ]]

Function Signature
--[[
	Sets the media for the poll answer.
]]
function PollAnswer.Prototype.setMedia(self: PollAnswer, media: mediaBuilder.JSON) -> PollAnswer end

Arguments

media

mediaBuilder.JSON

Returns

ret1

PollAnswer

PollAnswer.Prototype.build

[[ Responsible for building the PollAnswer JSON that can be parsed by the Discord API. ]]

Function Signature
--[[
	Responsible for building the PollAnswer JSON that can be parsed by the Discord API.
]]
function PollAnswer.Prototype.build(self: PollAnswer) -> JSON end

Returns

ret1

JSON

PollAnswer.Interface.new

[[ Responsible for creating a new PollAnswer.

```lua

``` ]]

Function Signature
--[[
	Responsible for creating a new PollAnswer.

	\`\`\`lua
	
	\`\`\`
]]
function PollAnswer.Interface.new(resource: {
		answerId: number?,

		pollMedia: mediaBuilder.JSON?
	}?) -> PollAnswer end

Arguments

resource

This field is optional and may not be specified

{answerId: number?, pollMedia: mediaBuilder.JSON?}?

Returns

ret1

PollAnswer

Last updated on