OnboardingPrompt
Implementation of discords Prompt object as a Luau builder.
Summary
Properties
OnboardingPrompt.options :: { Builders.Message.SelectMenuOption }OnboardingPrompt.type :: apiTypes.OnboardingPromptTypeOnboardingPrompt.title :: stringOnboardingPrompt.singleSelect :: booleanOnboardingPrompt.required :: booleanMethods
OnboardingPrompt:addOption(option: option.JSON) → PromptOnboardingPrompt:setType(type: apiTypes.OnboardingPromptType) → PromptOnboardingPrompt:setTitle(title: string) → PromptOnboardingPrompt:setSingleSelect(singleSelect: boolean) → PromptOnboardingPrompt:setRequired(required: boolean) → PromptOnboardingPrompt:build() → JSONProperties
Section titled “Properties”options
Section titled “options”The array of options available within this prompt.
OnboardingPrompt.type :: OnboardingPromptType
The type of prompt to display.
The title of the prompt to display.
singleSelect
Section titled “singleSelect”Whether users can select only one option or multiple options.
required
Section titled “required”Whether this prompt is required to be answered or not.
Methods
Section titled “Methods”addOption
Section titled “addOption”OnboardingPrompt : addOption ( option ) -> Prompt
Add an Option to this prompt
Parameters
| option: JSON |
Returns
| Prompt |
setType
Section titled “setType”OnboardingPrompt : setType ( type ) -> Prompt
Set the type of prompt.
Parameters
| type: OnboardingPromptType |
Returns
| Prompt |
setTitle
Section titled “setTitle”OnboardingPrompt : setTitle ( title ) -> Prompt
Set the title of this prompt
Parameters
| title: string |
Returns
| Prompt |
setSingleSelect
Section titled “setSingleSelect”OnboardingPrompt : setSingleSelect ( singleSelect ) -> Prompt
Set weather or not users can select one option, or multiple.
Parameters
| singleSelect: boolean |
Returns
| Prompt |
setRequired
Section titled “setRequired”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 |
Functions
Section titled “Functions”OnboardingPrompt . new ( resource ) -> Prompt
Responsible for creating a new Prompt.
Parameters
| resource: { type: apiTypes.OnboardingPromptType?, options: { option.JSON, } |
Returns
| Prompt |