Skip to content

OnboardingPrompt

Implementation of discords Prompt object as a Luau builder.

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

OnboardingPrompt.options  :: SelectMenuOption }

The array of options available within this prompt.

OnboardingPrompt.type  :: OnboardingPromptType

The type of prompt to display.

OnboardingPrompt.title  :: string

The title of the prompt to display.

OnboardingPrompt.singleSelect  :: boolean

Whether users can select only one option or multiple options.

OnboardingPrompt.required  :: boolean

Whether this prompt is required to be answered or not.

OnboardingPrompt : addOption ( option )  -> Prompt

Add an Option to this prompt

Parameters

option: JSON

Returns

Prompt
OnboardingPrompt : setType ( type )  -> Prompt

Set the type of prompt.

Parameters

type: OnboardingPromptType

Returns

Prompt
OnboardingPrompt : setTitle ( title )  -> Prompt

Set the title of this prompt

Parameters

title: string

Returns

Prompt
OnboardingPrompt : setSingleSelect ( singleSelect )  -> Prompt

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

Parameters

singleSelect: boolean

Returns

Prompt
OnboardingPrompt : setRequired ( required )  -> Prompt

Set weather this option is required or not.

Parameters

required: boolean

Returns

Prompt
OnboardingPrompt : build ( )  -> JSON

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

Returns

JSON
OnboardingPrompt . new ( resource )  -> Prompt

Responsible for creating a new Prompt.

Parameters

resource: {
type: apiTypes.OnboardingPromptType?,
options: { option.JSON,
}

Returns

Prompt