DiscordLua
discorddiscord
v1.2.9
Install

SharedSlashCommandOptions

Class
On this page

SharedSlashCommandOptions is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.

class Module 1.2.9 Source

Methods

SharedSlashCommandOptions:addAttachmentOption()

#

Add AttachmentOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addAttachmentOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

SharedSlashCommandOptions — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addAttachmentOption(input)

SharedSlashCommandOptions:addBooleanOption()

#

Add BooleanOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addBooleanOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

SharedSlashCommandOptions — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addBooleanOption(input)

SharedSlashCommandOptions:addChannelOption()

#

Add ChannelOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addChannelOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

SharedSlashCommandOptions — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addChannelOption(input)

SharedSlashCommandOptions:addIntegerOption()

#

Add IntegerOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addIntegerOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addIntegerOption(input)

SharedSlashCommandOptions:addMentionableOption()

#

Add MentionableOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addMentionableOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

SharedSlashCommandOptions — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addMentionableOption(input)

SharedSlashCommandOptions:addNumberOption()

#

Add NumberOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addNumberOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addNumberOption(input)

SharedSlashCommandOptions:addRoleOption()

#

Add RoleOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addRoleOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

SharedSlashCommandOptions — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addRoleOption(input)

SharedSlashCommandOptions:addStringOption()

#

Add StringOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addStringOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addStringOption(input)

SharedSlashCommandOptions:addUserOption()

#

Add UserOption to this SharedSlashCommandOptions.

Signature

SharedSlashCommandOptions:addUserOption(input)

Parameters

NameTypeRequiredBehavior
input any required Passed through to the implementation as written.

Returns

SharedSlashCommandOptions — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommandOptions
object:addUserOption(input)

Examples

Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationCommandNumericOptionMinMaxValueMixin · ApplicationCommandOptionBase

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc