Skip to content

DefaultValue

Implementation of discords DefaultValue object as a Luau builder.

https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure

Properties

The DefaultValue instance has no set properties!

Methods

The DefaultValue instance has no set methods!

Functions

setId

DefaultValue . setId (

     self: DefaultValue
     id: string
)  -> ()

Sets the id of the default value.

setType

DefaultValue . setType (

     self: DefaultValue
     type: apiTypes.SelectDefaultValueType
)  -> ()

Sets the type of the default value.

build

DefaultValue . build (

     self: DefaultValue
)  -> ()

Responsible for building the DefaultValue JSON that can be parsed by the Discord API.

new

DefaultValue . new (

     resource: {
       id: string,
       type: apiTypes.SelectDefaultValueType,
    }
)  -> ()

Responsible for creating a new DefaultValue.

local defaultValue = DefaultValue.new({
id = "123",
type = "user"
})