OptionSelect

OptionSelect

Represents when an option is selected.

Constructor

new OptionSelect(client, data, options)

Description:
  • Creates an option selected interaction structure.

Source:
See:
Parameters:
Name Type Description
client Client

The client instance.

data Object

The interaction data from Discord.

options Object

Additional options for this structure.

Properties
Name Type Description
guildId String

The ID of the guild that this interaction belongs to.

channelId String

The ID of the channel that this interaction belongs to.

Extends

Members

(readonly, nullable) channel :TextChannel|VoiceChannel|Thread

Description:
  • The channel that this interaction belongs to.

Source:
Overrides:

The channel that this interaction belongs to.

Type:

(readonly) channelId :String

Description:
  • The id of the channel that this interaction belongs to.

Source:
Overrides:

The id of the channel that this interaction belongs to.

Type:
  • String

(readonly) customId :String

Description:
  • The custom id of the select menu.

Source:

The custom id of the select menu.

Type:
  • String

(readonly, nullable) guild :Guild

Description:
  • The guild that this interaction belongs to.

Source:
Overrides:

The guild that this interaction belongs to.

Type:

(readonly) guildId :String

Description:
  • The id of the guild that this interaction belongs to.

Source:
Overrides:

The id of the guild that this interaction belongs to.

Type:
  • String

(readonly) id :String

Description:
  • The id of the interaction.

Source:
Overrides:

The id of the interaction.

Type:
  • String

(readonly, nullable) member :Member

Description:
  • The member that triggered the interaction, if it was run in a guild.

Source:
Overrides:

The member that triggered the interaction, if it was run in a guild.

Type:

(readonly) message :Message

Description:
  • The message which the option belongs to.

Source:

The message which the option belongs to.

Type:

(readonly) type :Number

Description:
  • The type of interaction.

Source:
Overrides:

The type of interaction.

Type:
  • Number

(readonly) values :Array.<Object>

Description:
  • The values selected from the select menu.

Source:
See:

The values selected from the select menu.

Type:
  • Array.<Object>

Methods

(async) acknowledge() → {Promise.<Interaction>}

Description:
  • Silently acknowledges an interaction.

Source:
Overrides:
Returns:
Type
Promise.<Interaction>

(async) autocompleteResponse(options) → {Promise.<Interaction>}

Description:
  • Responds to autocomplete interactions.

Source:
Overrides:
Parameters:
Name Type Description
options Object

Autocompletion options.

Throws:
Error
Returns:
Type
Promise.<Interaction>

(async) edit(contentnullable, optionsnullable) → {Promise.<Interaction>}

Description:
  • Edits a response to an interaction. Works up to 15 minutes after the response was sent.

Source:
Overrides:
Parameters:
Name Type Attributes Description
content String <nullable>

The new interaction response content.

options Object <nullable>

The new interaction response options.

Throws:
Error | TypeError
Returns:
Type
Promise.<Interaction>

(async) reply(contentnullable, optionsnullable) → {Promise.<Interaction>}

Description:
  • Replies to an interaction.

Source:
Overrides:
Parameters:
Name Type Attributes Description
content String <nullable>

The message content to send in the response to the interaction.

options Object <nullable>

An embed, components, and whether the response should be as an ephemeral message.

Returns:
Type
Promise.<Interaction>

(async) textPrompt(options) → {Promise.<void>}

Description:
  • Prompts a user to enter text using a modal.

Source:
Overrides:
Parameters:
Name Type Description
options Object

Modal options.

Throws:
Error | TypeError
Returns:
Type
Promise.<void>

toJSON(format) → {Object}

Description:
  • Returns the JSON representation of this structure.

Source:
Overrides:
Parameters:
Name Type Description
format Number

The format to return the data in.

Returns:
Type
Object

toString()

Source:
Overrides: