Skip to content

OnboardingPromptBuilder

OnboardingPromptBuilder allows you to build onboarding for discord guilds.

Usage:

local DiscordLuau = require("../Submodules/DiscordLuau")
local OnboardingPromptBuilder = DiscordLuau.OnboardingPromptBuilder.new()
:setType(DiscordLuau.OnboardingPromptBuilder.Type.Dropdown)
:addOption(
DiscordLuau.OnboardingPromptOptionBuilder.new()
:setTitle("option-name")
:setDescription("Option Description!")
)

Properties

Type

OnboardingPromptBuilder.Type  :: table

An enumeration of prompt types

  • MultipleChoice: 0
  • Dropdown: 1

Methods

setType

OnboardingPromptBuilder : setType (

     type: number
)  -> Builders.OnboardingPromptBuilder

Set the type of the Onboarding Prompt builder

addOption

OnboardingPromptBuilder : addOption (

     option: Builders.OnboardingPromptOptionBuilder
)  -> Builders.OnboardingPromptBuilder

Adds an option to the Onboarding prompt builder.

setTitle

OnboardingPromptBuilder : setTitle (

     title: string
)  -> Builders.OnboardingPromptBuilder

Sets the title of the onboarding prompt builder

setSingleSelection

OnboardingPromptBuilder : setSingleSelection (

     isSingleSelection: boolean
)  -> Builders.OnboardingPromptBuilder

Indicates whether users are limited to selecting one option for the prompt

setRequired

OnboardingPromptBuilder : setRequired (

     isRequired: boolean
)  -> Builders.OnboardingPromptBuilder

Indicates whether the prompt is required before a user completes the onboarding flow

setIsOnboarding

OnboardingPromptBuilder : setIsOnboarding (

     isInOnboarding: boolean
)  -> Builders.OnboardingPromptBuilder

Indicates whether the prompt is present in the onboarding flow. If false, the prompt will only appear in the Channels & Roles tab

toPayloadObject

OnboardingPromptBuilder : toPayloadObject ()  -> Network.Resolvable

Converts the message to a JSON object that can be sent to the Discord API.

Functions

new

OnboardingPromptBuilder . new ()  -> ()

Creates a new instance of OnboardingPromptBuilder.