Creates a new instance of the ComponentContext class.
The UsingClient instance.
The component interaction object.
Readonly
clientThe UsingClient instance.
The component interaction object.
Gets the author of the interaction.
Gets the ID of the channel of the interaction.
Gets the ID of the guild of the interaction.
Gets the member of the interaction.
Gets the proxy object.
Gets the language object for the interaction's locale.
Gets the channel of the interaction.
Optional
mode: "rest" | "flow"The mode to fetch the channel.
A promise that resolves to the channel.
Gets the channel of the interaction.
The mode to fetch the channel.
A promise that resolves to the channel.
Defers the reply to the interaction.
Whether the reply should be ephemeral or not.
Optional
fetchReply: FRDeletes the response of the interaction.
A promise that resolves when the response is deleted.
Edits the response or replies to the interaction.
The body of the response or updated body of the interaction.
Optional
fetchReply: FRWhether to fetch the reply or not.
Edits the response of the interaction.
The updated body of the response.
A Promise that resolves to the fetched message
Gets the guild of the interaction.
Optional
mode: "rest" | "flow"The mode to fetch the guild.
A promise that resolves to the guild.
Gets the guild of the interaction.
The mode to fetch the guild.
A promise that resolves to the guild.
Gets the bot member in the guild of the interaction.
Optional
mode: "rest" | "flow"The mode to fetch the member.
A promise that resolves to the bot member.
Gets the bot member in the guild of the interaction.
The mode to fetch the member.
A promise that resolves to the bot member.
Optional
options: undefinedWrites a response to the interaction.
The body of the response.
Optional
fetchReply: FRWhether to fetch the reply or not.
Represents a context for interacting with components in a Discord bot.
Template: Type
The type of component interaction.