DiscordLua
discorddiscord
v1.2.9
Install

SharedSlashCommand

Class
On this page

SharedSlashCommand 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

SharedSlashCommand:setContexts()

#

Set the Contexts field. Builders return this SharedSlashCommand so setters can be chained.

Signature

SharedSlashCommand:setContexts(first, ...)

Parameters

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

Returns

SharedSlashCommand — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommand
object:setContexts(first, ...)

SharedSlashCommand:setDefaultMemberPermissions()

#

Set the DefaultMemberPermissions field. Builders return this SharedSlashCommand so setters can be chained.

Signature

SharedSlashCommand:setDefaultMemberPermissions(permissions)

Parameters

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

Returns

SharedSlashCommand — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommand
object:setDefaultMemberPermissions(permissions)

SharedSlashCommand:setDefaultPermission()

#

Set the DefaultPermission field. Builders return this SharedSlashCommand so setters can be chained.

Signature

SharedSlashCommand:setDefaultPermission(enabled)

Parameters

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

Returns

SharedSlashCommand — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommand
object:setDefaultPermission(enabled)

SharedSlashCommand:setDMPermission()

#

Set the DMPermission field. Builders return this SharedSlashCommand so setters can be chained.

Signature

SharedSlashCommand:setDMPermission(enabled)

Parameters

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

Returns

SharedSlashCommand — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommand
object:setDMPermission(enabled)

SharedSlashCommand:setIntegrationTypes()

#

Set the IntegrationTypes field. Builders return this SharedSlashCommand so setters can be chained.

Signature

SharedSlashCommand:setIntegrationTypes(first, ...)

Parameters

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

Returns

SharedSlashCommand — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommand
object:setIntegrationTypes(first, ...)

SharedSlashCommand:setNSFW()

#

Set the NSFW field. Builders return this SharedSlashCommand so setters can be chained.

Signature

SharedSlashCommand:setNSFW(nsfw)

Parameters

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

Returns

SharedSlashCommand — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a SharedSlashCommand
object:setNSFW(nsfw)

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