Skip to content

Prompt

Implementation of discords Prompt object as a Luau builder.

https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure

Properties

The Prompt instance has no set properties!

Methods

The Prompt instance has no set methods!

Functions

addOption

Prompt . addOption (

     self: Prompt
     option: option.JSON
)  -> ()

Add an Option to this prompt

setType

Prompt . setType (

     self: Prompt
     type: apiTypes.OnboardingPromptType
)  -> ()

Set the type of prompt.

setTitle

Prompt . setTitle (

     self: Prompt
     title: string
)  -> ()

Set the title of this prompt

setSingleSelect

Prompt . setSingleSelect (

     self: Prompt
     singleSelect: boolean
)  -> ()

Set weather or not users can select one option, or multiple.

setRequired

Prompt . setRequired (

     self: Prompt
     required: boolean
)  -> ()

Set weather this option is required or not.

build

Prompt . build (

     self: Prompt
)  -> ()

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

new

Prompt . new (

     resource: {
       type: apiTypes.OnboardingPromptType?,
       options: { option.JSON,
    }
)  -> ()

Responsible for creating a new Prompt.