SlashCommandStringOption
ClassOn this page
SlashCommandStringOption is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
Methods
SlashCommandStringOption:setMaxLength()
#Set the MaxLength field. Builders return this SlashCommandStringOption so setters can be chained.
Signature
SlashCommandStringOption:setMaxLength(value) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
value |
any |
required | Passed through to the implementation as written. |
Returns
SlashCommandStringOption — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SlashCommandStringOption
object:setMaxLength(value)SlashCommandStringOption:setMinLength()
#Set the MinLength field. Builders return this SlashCommandStringOption so setters can be chained.
Signature
SlashCommandStringOption:setMinLength(value) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
value |
any |
required | Passed through to the implementation as written. |
Returns
SlashCommandStringOption — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SlashCommandStringOption
object:setMinLength(value)Examples
Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.
Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationCommandNumericOptionMinMaxValueMixin · ApplicationCommandOptionBase
Version: discord 1.2.9 · runtime 1.0.0