SharedSlashCommandSubcommands
ClassOn this page
SharedSlashCommandSubcommands 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
SharedSlashCommandSubcommands:addSubcommand()
#Add Subcommand to this SharedSlashCommandSubcommands.
Signature
SharedSlashCommandSubcommands:addSubcommand(input) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
input |
any |
required | Passed through to the implementation as written. |
Returns
SharedSlashCommandSubcommands — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedSlashCommandSubcommands
object:addSubcommand(input)SharedSlashCommandSubcommands:addSubcommandGroup()
#Add SubcommandGroup to this SharedSlashCommandSubcommands.
Signature
SharedSlashCommandSubcommands:addSubcommandGroup(input) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
input |
any |
required | Passed through to the implementation as written. |
Returns
SharedSlashCommandSubcommands — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a SharedSlashCommandSubcommands
object:addSubcommandGroup(input)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