OnboardingOption
Implementation of discords Option object as a Luau builder.
https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
Summary
Properties
OnboardingOption.channelIds :: {string}OnboardingOption.roleIds :: {string}OnboardingOption.emojiId :: string?OnboardingOption.emojiName :: string?OnboardingOption.emojiAnimated :: boolean?OnboardingOption.title :: stringOnboardingOption.description :: string?Methods
OnboardingOption:addChannelId(channelId: string) → OptionOnboardingOption:addRoleId(roleId: string) → OptionOnboardingOption:setEmoji(emojiId: string, emojiName: string, isAnimated: boolean?) → OptionOnboardingOption:setTitle(title: string) → OptionOnboardingOption:setDescription(description: string) → OptionOnboardingOption:build() → JSONProperties
Section titled “Properties”channelIds
Section titled “channelIds”Array of channel IDs that are associated with this option.
roleIds
Section titled “roleIds”Array of role IDs that are associated with this option.
emojiId
Section titled “emojiId”The ID of the emoji used for this option.
emojiName
Section titled “emojiName”The name of the emoji used for this option.
emojiAnimated
Section titled “emojiAnimated”Whether the emoji used for this option is animated.
The title displayed for this option.
description
Section titled “description”The description displayed for this option.
Methods
Section titled “Methods”addChannelId
Section titled “addChannelId”OnboardingOption : addChannelId ( channelId ) -> Option
Add a Channel to this option
Parameters
| channelId: string |
Returns
| Option |
addRoleId
Section titled “addRoleId”OnboardingOption : addRoleId ( roleId ) -> Option
Add a Role to this option
Parameters
| roleId: string |
Returns
| Option |
setEmoji
Section titled “setEmoji”OnboardingOption : setEmoji ( emojiId , emojiName , isAnimated ) -> Option
Sets the emoji of this option.
setTitle
Section titled “setTitle”OnboardingOption : setTitle ( title ) -> Option
Sets the title of this option.
Parameters
| title: string |
Returns
| Option |
setDescription
Section titled “setDescription”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 |
Functions
Section titled “Functions”OnboardingOption . new ( resource ) -> Option
Responsible for creating a new Option.
Parameters
| resource: { { channelIds: { string } } |
Returns
| Option |