DiscordLua
discorddiscord
v1.2.4
Install

CommandInteractionOptionResolver

Class
On this page

CommandInteractionOptionResolver 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.4 Source

Constructor

CommandInteractionOptionResolver.new(interaction)

The class table is callable, so CommandInteractionOptionResolver(interaction) is the same as .new.

NameTypeRequiredBehavior
interaction any required Passed through to the implementation as written.
lua
local discord = require("discord")
local object = discord.CommandInteractionOptionResolver({})

Properties

CommandInteractionOptionResolver.client

# readonly
Name
client
Type
any
Access
readonly
Description
Owning Client instance used for REST, cache, and event dispatch.
Availability
Populated from the Gateway/REST payload or constructor for this CommandInteractionOptionResolver.

CommandInteractionOptionResolver.data

# readonly
Name
data
Type
any
Access
readonly
Description
Instance field CommandInteractionOptionResolver.data. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this CommandInteractionOptionResolver.

CommandInteractionOptionResolver.interaction

# readonly
Name
interaction
Type
any
Access
readonly
Description
Instance field CommandInteractionOptionResolver.interaction. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this CommandInteractionOptionResolver.

CommandInteractionOptionResolver.resolved

# readonly
Name
resolved
Type
any
Access
readonly
Description
Instance field CommandInteractionOptionResolver.resolved. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this CommandInteractionOptionResolver.

Methods

CommandInteractionOptionResolver:get()

#

Performs get on this CommandInteractionOptionResolver. Call it from bot code when you need that operation on the current object.

Signature

CommandInteractionOptionResolver:get(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Throws

ValidationError

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:get(name, required)

CommandInteractionOptionResolver:getAttachment()

#

Read the Attachment value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getAttachment(name, required)

Parameters

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

Returns

any.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getAttachment(name, required)

CommandInteractionOptionResolver:getBoolean()

#

Read the Boolean value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getBoolean(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getBoolean(name, required)

CommandInteractionOptionResolver:getChannel()

#

Read the Channel value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getChannel(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getChannel(name, required)

CommandInteractionOptionResolver:getFocused()

#

Read the Focused value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getFocused(getFull)

Parameters

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

Returns

any.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getFocused(getFull)

CommandInteractionOptionResolver:getInteger()

#

Read the Integer value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getInteger(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getInteger(name, required)

CommandInteractionOptionResolver:getMember()

#

Read the Member value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getMember(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getMember(name, required)

CommandInteractionOptionResolver:getMentionable()

#

Read the Mentionable value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getMentionable(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getMentionable(name, required)

CommandInteractionOptionResolver:getMessage()

#

Read the Message value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getMessage()

Parameters

No parameters.

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getMessage()

CommandInteractionOptionResolver:getNumber()

#

Read the Number value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getNumber(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getNumber(name, required)

CommandInteractionOptionResolver:getRole()

#

Read the Role value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getRole(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getRole(name, required)

CommandInteractionOptionResolver:getString()

#

Read the String value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getString(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getString(name, required)

CommandInteractionOptionResolver:getSubcommand()

#

Read the Subcommand value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getSubcommand(required)

Parameters

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

Returns

any.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getSubcommand(required)

CommandInteractionOptionResolver:getSubcommandGroup()

#

Read the SubcommandGroup value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getSubcommandGroup(required)

Parameters

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

Returns

any.

Throws

ValidationError

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getSubcommandGroup(required)

CommandInteractionOptionResolver:getUser()

#

Read the User value from this CommandInteractionOptionResolver.

Signature

CommandInteractionOptionResolver:getUser(name, required)

Parameters

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

Returns

CommandInteractionOptionResolver — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getUser(name, required)

Examples

lua
local discord = require("discord")
local object = discord.CommandInteractionOptionResolver({})

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc