Skip to content

OnboardingOption

Implementation of discords Option object as a Luau builder.

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

OnboardingOption.channelIds  :: {string}

Array of channel IDs that are associated with this option.

OnboardingOption.roleIds  :: {string}

Array of role IDs that are associated with this option.

OnboardingOption.emojiId  :: string?

The ID of the emoji used for this option.

OnboardingOption.emojiName  :: string?

The name of the emoji used for this option.

OnboardingOption.emojiAnimated  :: boolean?

Whether the emoji used for this option is animated.

OnboardingOption.title  :: string

The title displayed for this option.

OnboardingOption.description  :: string?

The description displayed for this option.

OnboardingOption : addChannelId ( channelId )  -> Option

Add a Channel to this option

Parameters

channelId: string

Returns

Option
OnboardingOption : addRoleId ( roleId )  -> Option

Add a Role to this option

Parameters

roleId: string

Returns

Option
OnboardingOption : setEmoji ( emojiId emojiName isAnimated )  -> Option

Sets the emoji of this option.

Parameters

emojiId: string
emojiName: string
isAnimated: boolean?

Returns

Option
OnboardingOption : setTitle ( title )  -> Option

Sets the title of this option.

Parameters

title: string

Returns

Option
OnboardingOption : setDescription ( description )  -> Option

Sets the description of this option.

Parameters

description: string

Returns

Option
OnboardingOption : build ( )  -> JSON

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

Returns

JSON
OnboardingOption . new ( resource )  -> Option

Responsible for creating a new Option.

Parameters

resource: {
{ channelIds: { string } }

Returns

Option