LogoAntiRaid

@discord-types/builders/guild/onboarding/prompt

API reference for @discord-types/builders/guild/onboarding/prompt

@discord-types/builders/guild/onboarding/prompt

Types

Prompt

Raw Type
type Prompt = Prompt.Prototype, & {
	type: guildTypes.OnboardingPromptType,

	options: {option.JSON},

	title: string,

	singleSelect: boolean,

	required: boolean
}

Intersection with variants:

Variant 2
PropTypeDescription
type
-
options
-
title
-
singleSelect
-
required
-

JSON

Raw Type
type JSON = Prompt.Prototype.build(nil :: any),

Functions

Prompt.Prototype.addOption

[[ Add an Option to this prompt ]]

Function Signature
--[[
	Add an Option to this prompt
]]
function Prompt.Prototype.addOption(self: Prompt, option: option.JSON) -> Prompt end

Arguments

option

option.JSON

Returns

ret1

Prompt

Prompt.Prototype.setType

[[ Set the type of prompt. ]]

Function Signature
--[[
	Set the type of prompt.
]]
function Prompt.Prototype.setType(self: Prompt, type: guildTypes.OnboardingPromptType) -> Prompt end

Arguments

type

guildTypes.OnboardingPromptType

Returns

ret1

Prompt

Prompt.Prototype.setTitle

[[ Set the title of this prompt ]]

Function Signature
--[[
	Set the title of this prompt
]]
function Prompt.Prototype.setTitle(self: Prompt, title: string) -> Prompt end

Arguments

title

string

Returns

ret1

Prompt

Prompt.Prototype.setSingleSelect

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

Function Signature
--[[
	Set weather or not users can select one option, or multiple.
]]
function Prompt.Prototype.setSingleSelect(self: Prompt, singleSelect: boolean) -> Prompt end

Arguments

singleSelect

boolean

Returns

ret1

Prompt

Prompt.Prototype.setRequired

[[ Set weather this option is required or not. ]]

Function Signature
--[[
	Set weather this option is required or not.
]]
function Prompt.Prototype.setRequired(self: Prompt, required: boolean) -> Prompt end

Arguments

required

boolean

Returns

ret1

Prompt

Prompt.Prototype.build

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

Function Signature
--[[
	Responsible for building the PromptObject JSON that can be parsed by the Discord API.
]]
function Prompt.Prototype.build(self: Prompt) -> JSON end

Returns

ret1

JSON

Prompt.Interface.new

[[ Responsible for creating a new Prompt.

```lua

``` ]]

Function Signature
--[[
	Responsible for creating a new Prompt.

	\`\`\`lua
	
	\`\`\`
]]
function Prompt.Interface.new(resource: {
		type: guildTypes.OnboardingPromptType?,

		options: {option.JSON}?,

		title: string?,

		singleSelect: boolean?,

		required: boolean?
	}?) -> Prompt end

Arguments

resource

This field is optional and may not be specified

{type: guildTypes.OnboardingPromptType?, options: {option.JSON}?, title: string?, singleSelect: boolean?, required: boolean?}?

Returns

ret1

Prompt

Last updated on