DiscordLua
discorddiscord
v1.2.4
Install

AutocompleteInteraction

interaction
On this page

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

interaction Module 1.2.4 Source

Methods

AutocompleteInteraction:getFocused()

#

Read the Focused value from this AutocompleteInteraction.

Signature

AutocompleteInteraction:getFocused(getFull)

Parameters

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

Returns

AutocompleteInteraction — the same instance, for chaining.

Example

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

AutocompleteInteraction:respond()

#

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

Signature

AutocompleteInteraction:respond(choices)

Parameters

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

Returns

AutocompleteInteraction — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a AutocompleteInteraction
object:respond(choices)

Examples

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

ButtonInteraction · ChannelSelectMenuInteraction · ChatInputCommandInteraction · ContextMenuCommandInteraction · Interaction · MentionableSelectMenuInteraction · MessageComponentInteraction · MessageContextMenuCommandInteraction

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc