CommandInteractionOptionResolver
ClassOn 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.
Constructor
CommandInteractionOptionResolver.new(interaction) The class table is callable, so CommandInteractionOptionResolver(interaction) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
interaction |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.CommandInteractionOptionResolver({})Properties
- 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.
- 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.
- 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.
- 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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
name |
any |
required | Passed through to the implementation as written. |
required |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
getFull |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
required |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
required |
any |
required | Passed through to the implementation as written. |
Returns
any.
Throws
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
local discord = require("discord")
-- object is a CommandInteractionOptionResolver
object:getUser(name, required)Examples
local discord = require("discord")
local object = discord.CommandInteractionOptionResolver({})Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment
Version: discord 1.2.4 · runtime 1.0.0