# Honocord
> Build an HTTP interactions Discord bot with Hono. Runs on Cloudflare Workers, Bun and Node.js.
# Getting Started
## Requirements
- **Node.js** 24 or higher (for development)
- **npm**, **pnpm**, or **yarn** package manager
- A **Discord Application** from the [Discord Developer Portal](https://discord.com/developers/applications)
### Package Installation
Install Honocord using your preferred package manager:
```bash
npm install honocord
pnpm add honocord
yarn add honocord
bun add honocord
poop add honocord
```
### Required Dependencies
Honocord declares `hono` as a peer dependency, so you install it yourself:
```bash
npm install hono
pnpm add hono
yarn add hono
bun add hono
```
`hono@^4.13.1` or higher is required. The MongoDB cache adapter (`honocord/cache/mongo`) has an optional peer
dependency on `mongoose@^9.9.1` — see [Caching](/docs/caching).
## Discord Application Setup
1. Visit the [Discord Developer Portal](https://discord.com/developers/applications)
2. Click "New Application" and give it a name
3. Navigate to the "Bot" tab and create a bot
4. Copy the following credentials:
- **Application ID** (from "General Information")
- **Public Key** (from "General Information")
- **Bot Token** (from "Bot" tab)
## Environment Configuration
Create a `.env` file in your project root:
```bash
DISCORD_APPLICATION_ID=your_application_id_here
DISCORD_PUBLIC_KEY=your_public_key_here
DISCORD_TOKEN=your_bot_token_here
```
##### Cloudflare Workers Specific
For Cloudflare Workers, add:
```bash
IS_CF_WORKER=true
```
or use the parameter in the `Honocord` constructor: `new Honocord({ isCFWorker: true })`
## Common Errors
- "Bad request signature" → Wrong `DISCORD_PUBLIC_KEY`
- "Unauthorized" → Invalid `DISCORD_TOKEN`
- "Application not found" → Wrong `DISCORD_APPLICATION_ID`
# Quick Start
This guide will help you create your first Discord bot with Honocord in a few minutes.
## Step 1: Create Your Bot File
```ts title="src/index.ts"
import { Honocord, SlashCommandHandler } from "honocord";
// Initialize Honocord
const bot = new Honocord();
// Create a simple command
const pingCommand = new SlashCommandHandler()
.setName("ping")
.setDescription("Replies with Pong!")
.addHandler(async (interaction) => {
await interaction.reply("🏓 Pong!");
});
// Load the command
bot.loadHandlers(pingCommand);
// Export the app
export default bot.getApp();
```
## Step 2: Register Commands with Discord
```ts title="src/register.ts"
import { registerCommands } from "honocord";
import { pingCommand } from "./index";
await registerCommands(process.env.DISCORD_TOKEN!, process.env.DISCORD_APPLICATION_ID!, pingCommand);
```
Run the registration script:
```bash
node --env-file=.env src/register.ts
bun --env-file=.env src/register.ts
npx tsx --env-file=.env src/register.ts
```
## Step 3: Run Your Bot Locally
For local development with Bun:
```bash
bun --hot src/index.ts
```
For Node.js:
```bash
npx tsx --hot src/index.ts
```
## Step 4: Configure Discord Interactions Endpoint
1. Use a tunneling service like [ngrok](https://ngrok.com/):
```bash
ngrok http 3000
```
2. Copy the HTTPS URL (e.g., `https://abc123.ngrok.io`)
3. Go to your [Discord Application](https://discord.com/developers/applications)
4. Navigate to "General Information"
5. Set "Interactions Endpoint URL" to: `https://abc123.ngrok.io/`
6. Discord will verify the endpoint - it should show a green checkmark
## Step 5: Test Your Bot
1. Invite your bot to a server using this URL format:
```
https://discord.com/api/oauth2/authorize?client_id=&scope=applications.commands
```
2. In Discord, type `/ping`
3. Your bot should respond with "🏓 Pong!"
## Adding More Features
Learn about typings
Learn how to use handlers
How to build and deploy on Cloudflare Workers
# Most Important Discord.js Differences
Handling Discord interactions in Honocord differs not much from discord.js, but there are some key differences to be aware of:
## No internal convinience classes for Discord objects
Honocord does not provide internal classes for Discord objects like `User`, `Guild`, `Message`, etc.
Instead, it provides raw interaction data as defined by the [Discord API](https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure).
Most of the types are defined in the [discord-api-types](https://www.npmjs.com/package/discord-api-types) package, which Honocord depends on.
This means you will often work with plain objects instead of class instances.
## No built-in caching
It is definitly planned to add optional caching in the future, but currently Honocord does not cache any data due to it being designed for serverless environments like Cloudflare Workers.
## Responding to interactions
### Replying
Usually you need to provide the raw API callback data, instead of discord.js structures. However, there are a few exceptions where Honocord accepts builders from `@discordjs/builders`:
- Components: Every component builder from `@discordjs/builders` is accepted in `ctx.reply()` and similar methods.
- Modals: Every modal builder from `@discordjs/builders` is accepted in `ctx.showModal()`.
### Force Ephemeral
For `ctx.reply()` and `ctx.followUp()`, you can force the message to be ephemeral by passing `true` as the second argument:
```ts
await ctx.reply("This is an ephemeral message", true);
```
This was done because I got annoyed having to always set the ephemeral flag in the response data manually, which was very clunky.
### Defering
You can defer, but can't pass flags at the moment. However you **can** set whether it should be ephemeral or not:
```ts
await ctx.deferReply(true);
// or
await ctx.deferUpdate(false);
```
# Migrating to v4
Honocord v4 merges the separate cache adapter packages into `honocord` itself. v4.1 then raises the minimum Node.js version to 24. If your bot doesn't use a cache adapter and already runs on Node.js 24 or newer, updating the package is all you need to do.
## What changed
| Version | Change | Action needed |
| ------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| 4.0.0 | `@honocord/cache-*` packages merged into `honocord` as subpath exports | Update imports, uninstall the old packages |
| 4.0.0 | Unused `CacheAdapter` interface and `CacheSetOptions` type removed | Only if you imported them: extend `BaseCacheAdapter` instead |
| 4.0.0 | `mset()` entry shape exported as `CacheEntry` | None (optional: use it to type your entries) |
| 4.0.0 | CommonJS `main`/`types`/`exports` fixed: `require("honocord")` now resolves | None |
| 4.0.0 | Dependencies updated: `@discordjs/builders` 1.15.0, `@discordjs/core` 2.7.0, `discord-api-types` 0.38.58 | None, unless you pin these packages yourself |
| 4.1.0 | Node.js 24 or newer required (`engines.node` is `>=24`) | Upgrade Node.js (Cloudflare Workers are not affected by the Node version) |
| 4.1.0 | `AutocompleteHelper` exported from `honocord` | None. It was documented before but could not be imported. |
## Upgrade steps
1. **Check your Node.js version.** Run `node --version`. If it prints anything below `v24`, upgrade Node.js first, including on your server or in your CI. Bots on Cloudflare Workers can skip this step.
2. **Update Honocord.**
```bash
pnpm add honocord@^4.1.0
```
3. **Uninstall the old cache packages** you had installed. Skip this if you never used a cache adapter.
```bash
pnpm remove @honocord/cache-base @honocord/cache-memory @honocord/cache-do @honocord/cache-mongo
```
4. **Update your cache imports.** Export names are unchanged; only the paths differ.
| Old import | New import |
| ------------------------ | ----------------------- |
| `@honocord/cache-base` | `honocord/cache` |
| `@honocord/cache-memory` | `honocord/cache/memory` |
| `@honocord/cache-do` | `honocord/cache/do` |
| `@honocord/cache-mongo` | `honocord/cache/mongo` |
```ts
import { MemoryCacheAdapter } from "@honocord/cache-memory"; // [!code --]
import { MemoryCacheAdapter } from "honocord/cache/memory"; // [!code ++]
```
```ts
export { HonocordCacheDO } from "@honocord/cache-do"; // [!code --]
export { HonocordCacheDO } from "honocord/cache/do"; // [!code ++]
```
5. **Keep `mongoose` if you use MongoDB.** It is now an optional peer dependency of `honocord`, only needed when you import `honocord/cache/mongo`. Make sure it stays in your own `package.json`.
6. **Build and run your type check.** Any leftover `@honocord/cache-*` import now fails to resolve, so the compiler points you at what is left to change.
## Custom cache adapters
If you wrote your own adapter, extend `BaseCacheAdapter` from `honocord/cache`. The removed `CacheAdapter` interface never matched it: its `delete()` returned a `boolean` and its `set()` took an options object. `BaseCacheAdapter` uses these signatures:
```ts
import { BaseCacheAdapter, type CacheEntry } from "honocord/cache";
export class MyCacheAdapter extends BaseCacheAdapter {
async get(key: string): Promise {
/* ... */
}
async set(key: string, value: T, ttlMs?: number): Promise {
/* ... */
}
async mset(entries: CacheEntry[]): Promise {
/* ... */
}
async delete(key: string): Promise {
/* ... */
}
async has(key: string): Promise {
/* ... */
}
async clear(): Promise {
/* ... */
}
}
```
The [Caching guide](/docs/caching/) shows how to register an adapter with `withCache()` and how each built-in adapter is set
up.
## Autocomplete helper
`AutocompleteHelper` can now be imported from the package root, as the [Handlers guide](/docs/handlers/) always showed:
```ts
import { AutocompleteHelper } from "honocord";
```
If you worked around the missing export (for example by copying the helper into your project), you can delete your copy.
## Release notes
- [honocord@4.0.0](/changelog#4.0.0)
- [honocord@4.1.0](/changelog#4.1.0)
# Handlers
Handlers are the core of Honocord. They allow you to define both the metadata for Discord (like command names, descriptions, and options) and the logic that should run when an interaction occurs.
Honocord provides specialized handler classes for different types of interactions.
Currently, for `ComponentHandler` and `ContextCommandHandler`, you must pass the specific type **twice**: once as a generic type argument and once as a constructor parameter.
```ts
// Component Handlers
const mySelect = new ComponentHandler("role_select", ComponentType.RoleSelect);
// Context Menu Commands
const myMessageCommand = new ContextCommandHandler(ContextCommandType.Message);
```
The type argument is used for IDE IntelliSense and type safety (ensuring `ctx` is of type `RoleSelectInteraction` for example), while the constructor parameter is used for internal validation and routing.
Automatic inference is currently bugged and being worked on.
## Slash Commands
`SlashCommandHandler` is used for chat input commands. It extends the `@discordjs/builders` `SlashCommandBuilder`, so you can use all the familiar methods to define your command's structure.
```ts
import { SlashCommandHandler } from "honocord";
const pingCommand = new SlashCommandHandler()
.setName("ping")
.setDescription("Replies with Pong!")
.addHandler(async (ctx) => {
await ctx.reply("Pong!");
});
```
### Options and Subcommands
Since it extends `SlashCommandBuilder`, you can add options and subcommands directly.
```ts
const userCommand = new SlashCommandHandler()
.setName("userinfo")
.setDescription("Get info about a user")
.addUserOption((option) => option.setName("target").setDescription("The user to lookup").setRequired(true))
.addHandler(async (ctx) => {
const user = ctx.options.getUser("target", true); // if required option, pass true as second argument!
await ctx.reply(`User: ${user.username} (${user.id})`);
});
```
### Autocomplete
You can handle autocomplete interactions by adding an autocomplete handler to your command.
```ts
const searchCommand = new SlashCommandHandler()
.setName("search")
.setDescription("Search something")
.addStringOption((option) => option.setName("query").setDescription("The search query").setAutocomplete(true))
.addAutocompleteHandler(async (ctx) => {
const focused = ctx.options.getFocused();
const results = ["apple", "banana", "cherry"].filter((s) => s.startsWith(focused.value));
await ctx.respond(results.map((r) => ({ name: r, value: r })));
});
```
### Autocomplete Helper
Honocord provides an `AutocompleteHelper` utility to simplify filtering choices based on user input.
```ts
import { AutocompleteHelper } from "honocord";
command.addAutocompleteHandler(async (ctx) => {
const focused = ctx.options.getFocused()!;
const helper = new AutocompleteHelper(focused.value).addChoices(
{ name: "Apple", value: "apple" },
{ name: "Banana", value: "banana" },
{ name: "Cherry", value: "cherry" }
);
// Automatically filters choices that start with the user's input
await ctx.respond(helper.response(["name"]));
});
```
## Context Menu Commands
Use `ContextCommandHandler` to create User or Message context menu commands.
```ts
import { ContextCommandHandler, ContextCommandType } from "honocord";
const userContext = new ContextCommandHandler(ContextCommandType.User).setName("Get ID").addHandler(async (ctx) => {
await ctx.reply(`The user's ID is ${ctx.targetId}`);
});
```
## Message Components
`ComponentHandler` manages interactions from buttons and select menus. It uses a **prefix-based matching** system for `custom_id`s.
```ts
import { ComponentHandler } from "honocord";
import { ComponentType } from "discord-api-types/v10";
// Matches any button with a custom_id starting with "vote:"
const voteButton = new ComponentHandler("vote", ComponentType.Button).addHandler(async (ctx) => {
const [_, candidate] = ctx.customId.split(":");
await ctx.reply(`You voted for ${candidate}!`);
});
```
### Select Menus
You can create handlers for all types of select menus by specifying the correct `ComponentType`.
```ts
const menuHandler = new ComponentHandler("select_role", ComponentType.RoleSelect).addHandler(async (ctx) => {
// ctx is typed specifically for RoleSelect interactions
const roles = ctx.roles;
await ctx.reply(`Selected ${roles.size} roles.`);
});
```
## Modals
`ModalHandler` works similarly to component handlers, matching the `custom_id` of a submitted modal.
```ts
import { ModalHandler } from "honocord";
const feedbackModal = new ModalHandler("feedback_form").addHandler(async (ctx) => {
const feedback = ctx.components.getTextInputValue("feedback_input");
await ctx.reply("Thank you for your feedback!");
});
```
## Guild-Specific Commands
By default, commands are registered globally. You can restrict a command to specific guilds using `.setGuildIds()`.
```ts
const adminCommand = new SlashCommandHandler()
.setName("admin")
.setDescription("Restricted command")
.setGuildIds(["123456789012345678"]) // Only available in this guild
.addHandler(async (ctx) => {
await ctx.reply("Welcome, Admin.");
});
```
Need to handle commands whose name isn't known at load time (e.g. per-guild custom commands)? See the [Dynamic Commands](/docs/dynamic-commands) guide.
## Loading Handlers
Finally, you must load your handlers into the `Honocord` instance for them to be processed.
```ts
import { Honocord } from "honocord";
const bot = new Honocord();
bot.loadHandlers(pingCommand, userCommand, voteButton, feedbackModal);
```
Or if you have many handlers, you can load them from an array:
```ts
import * as handlers from "./handlers"; // assuming handlers/index.ts exports all (and ONLY) handlers
bot.loadHandlers(...Object.values(handlers));
```
## Webhook Events
`WebhookEventHandler` manages Discord webhook events. Unlike interactions, webhooks are one-way notifications from Discord about events happening in your app.
### Standard Mode (Default)
In standard mode, handlers must return a `Response` object. This is ideal for non-Cloudflare Workers environments.
```ts
import { WebhookEventHandler } from "honocord";
import { ApplicationWebhookEventType } from "discord-api-types/v10";
const messageHandler = new WebhookEventHandler(ApplicationWebhookEventType.LobbyMessageCreate);
messageHandler.addHandler(async (c) => {
const message = c.var.data;
console.log(`New message from ${message.author.username}: ${message.content}`);
// Must return a Response in standard mode
return c.json({ received: true });
});
```
### Worker Mode (Cloudflare Workers)
For Cloudflare Workers, set the second constructor parameter to `true`. In worker mode:
- No return value is required from your handler
- Honocord automatically responds with `200 OK` to Discord
- Processing happens asynchronously via `waitUntil`, extending the worker's lifetime
- `fetch()` and `getApp()` methods are disabled (type error + runtime error)
```ts
// Enable worker mode with second parameter
const messageHandler = new WebhookEventHandler(
ApplicationWebhookEventType.LobbyMessageCreate,
true // Worker mode
);
messageHandler.addHandler(async (c) => {
const message = c.var.data;
console.log(`Processing message: ${message.content}`);
// No return needed - Honocord handles the response
// Your code runs asynchronously via waitUntil
});
```
### Webhook vs Interactions
| Feature | Interactions | Webhooks |
| ---------------- | -------------------------------------- | ---------------------------------------------- |
| **Trigger** | User actions (slash commands, buttons) | Discord events (entitlements, lobby messages) |
| **Response** | Required within 3 seconds | Must respond within 3 seconds (204 or 200) |
| **Reply Method** | `interaction.reply()` | Use REST API separately |
| **Route** | `/` or `/interactions` | `/webhook` |
| **Setup** | Interactions Endpoint URL | Webhook Events URL in Discord Developer Portal |
| **CF Workers** | Async via `waitUntil` | Async via `waitUntil` (worker mode) |
### Webhook Handler Setup
When using `WebhookEventHandler` with Honocord:
1. Load handlers using `bot.loadHandlers()`
2. The webhook endpoint is automatically mounted at `/webhook`
3. Configure your Discord webhook URL to point to `https://your-domain.com/webhook`
```ts
const bot = new Honocord({ isCFWorker: true }); // Enable CF Workers mode
bot.loadHandlers(messageHandler);
// Webhook available at /webhook
// On CF Workers: responds immediately with 200, processes async
// On other platforms: waits for handler to return Response
export default bot.getApp();
```
On Cloudflare Workers, webhook events are processed asynchronously using `waitUntil`. This means: - Discord receives an
immediate `200 OK` response - Your handler code runs in the background - The worker's lifetime is extended to complete
processing - Prevents timeouts for slow operations (API calls, database writes)
### Standalone Webhook Handlers
Webhook handlers can run independently of Honocord. This is useful for microservices or separate webhook endpoints.
**Standard Mode Only:** The `fetch()` and `getApp()` methods are only available in standard mode (when `forWorker` is `false` or omitted).
```ts
import { Hono } from "hono";
const handler = new WebhookEventHandler(
ApplicationWebhookEventType.EntitlementCreate
// false or omit for standard mode
);
handler.addHandler(async (c) => {
const entitlement = c.var.data;
console.log(`New entitlement: ${entitlement.id}`);
// Must return Response in standard mode
return c.json({ ok: true });
});
// Use as standalone fetch handler
export default {
fetch: handler.fetch.bind(handler),
};
// Or mount in a Hono app
const app = new Hono();
app.route("/discord", handler.getApp());
export default app;
```
Worker mode handlers (`forWorker: true`) cannot use `fetch()` or `getApp()` because they don't return Response objects. Use them
with Honocord's `webhookHandler` instead.
### Available Webhook Events
Discord supports various webhook event types. Common ones include:
- `APPLICATION_AUTHORIZED` - App authorized by user
- `ENTITLEMENT_CREATE`, `ENTITLEMENT_UPDATE`, `ENTITLEMENT_DELETE` - Monetization events
- `LOBBY_MESSAGE_CREATE`, `LOBBY_MESSAGE_UPDATE`, `LOBBY_MESSAGE_DELETE` - Lobby messages
- `GAME_DIRECT_MESSAGE_CREATE`, `GAME_DIRECT_MESSAGE_UPDATE`, `GAME_DIRECT_MESSAGE_DELETE` - Game DMs
Refer to the [Discord Webhook Events documentation](https://docs.discord.com/developers/events/webhook-events) for the complete list.
# Typings
Honocord is built with TypeScript and provides deep type-safety for your Discord interactions. Since it's built on top of [Hono](https://hono.dev), it leverages Hono's powerful context system while adding Discord-specific enhancements.
## Base Interaction Context
The core of Honocord's type safety is the `BaseInteractionContext`. This type extends Hono's context and provides access to your environment bindings (like Cloudflare Workers environment variables) and custom Hono variables.
### Defining your Environment
To get full type safety, you should first define your environment's bindings and variables.
```ts
// types.ts
import type { BaseInteractionContext } from "honocord";
// Define your custom environment bindings (can also be Cloudflare Workers - you don't have to redifine this here)
export interface MyEnv {
DISCORD_APPLICATION_ID: string;
DISCORD_TOKEN: string;
DISCORD_PUBLIC_KEY: string;
DATABASE: D1Database; // Example Cloudflare D1
}
// Define your custom Hono variables (can be populated by middleware)
export interface MyVariables {
db: DBHelper; // Example database helper instance
is_admin: boolean;
}
// Create a reusable context type
export type MyContext = BaseInteractionContext;
```
## Applying Types to Handlers
To get full type safety within your handlers, pass your custom context type as a generic parameter when instantiating them. See the [Handlers guide](/docs/handlers) for more details on creates handlers.
```ts
import { SlashCommandHandler, ComponentHandler } from "honocord";
import { ComponentType } from "discord-api-types/v10";
import type { MyContext } from "./types";
// Slash Commands
const command = new SlashCommandHandler().setName("greet").addHandler(async (ctx) => {
// ctx.env and ctx.var are now fully typed!
const db = ctx.env.DATABASE;
});
// Component Handlers
const button = new ComponentHandler("my_id", ComponentType.Button).addHandler(async (ctx) => {
const userId = ctx.get("user_id");
});
```
## Middleware Type Safety
When writing middleware for Honocord, use the `MiddlewareFunction` type to ensure the context is correctly typed.
```ts
import type { MiddlewareFunction, Honocord } from "honocord";
import type { MyContext } from "./types";
// Note, that c is the Hono context, NOT the interaction context - you can't access interaction properties here yet because it runs before the interaction is parsed.
// It is still being worked on run the middleware after the interaction is created.
const bot = new Honocord().use(async (c, next) => {
c.set("db", new DBHelper(c.env.DATABASE));
return next();
});
```
## Built-in Interaction Types
Honocord provides typed interactions for all supported Discord interaction types. These inherit your custom context:
- `ChatInputCommandInteraction`: For slash commands.
- `AutocompleteInteraction`: For autocomplete options.
- `ButtonInteraction`: For button components.
- `StringSelectInteraction`: For string select menus.
- `UserSelectInteraction`, `RoleSelectInteraction`, etc.
- `ModalInteraction`: For modal submissions.
- `UserContextInteraction` & `MessageContextInteraction`: For context menu commands.
# Dynamic Commands
`SlashCommandHandler` and `ContextCommandHandler` require a fixed `name` set at load time. That works for commands your bot code defines up front, but not for commands whose name is only known at runtime — for example, per-guild custom commands stored in a database, where the application command is registered with Discord but Honocord has no matching named handler for it.
Honocord's **dynamic handlers** catch exactly this case. They're fallback handlers with no name of their own — instead of being looked up by name, one is invoked whenever an incoming application command interaction doesn't match any registered `SlashCommandHandler` or `ContextCommandHandler`.
## When They Fire
For every application command interaction, Honocord first checks the normal handler registry (global commands, then guild-specific commands by name). Only if **nothing matches** does it fall back to a dynamic handler.
Which dynamic handler runs depends on the interaction's scope:
- **Invoked in a guild** (`guild_id` present): the guild-scoped dynamic handler is tried first. If none is registered, Honocord falls back to the global-scoped one.
- **Invoked in a DM** (no `guild_id`): only the global-scoped dynamic handler is ever tried.
This mirrors the fact that Discord's interaction payload doesn't tell you whether a command was originally registered as guild- or global-scoped — only where it was invoked.
Only **one instance** of each dynamic handler class may be registered per `Honocord` instance. Loading a second one for the same
class logs a warning and overwrites the first.
## The Four Classes
| Class | Catches |
| ------------------------------------ | ----------------------------------------------------------------------- |
| `DynamicGuildSlashCommandHandler` | Unmatched chat input commands invoked in a guild |
| `DynamicGlobalSlashCommandHandler` | Unmatched chat input commands invoked in a DM, or as fallback |
| `DynamicGuildContextCommandHandler` | Unmatched User/Message context commands invoked in a guild |
| `DynamicGlobalContextCommandHandler` | Unmatched User/Message context commands invoked in a DM, or as fallback |
Unlike `SlashCommandHandler`/`ContextCommandHandler`, these classes don't extend a Discord builder — there's no `.setName()` or `.setDescription()`, since the command is expected to be registered with Discord elsewhere (e.g. by your own admin flow that creates per-guild custom commands via the REST API directly).
## Slash Commands
```ts
import { DynamicGuildSlashCommandHandler } from "honocord";
const customCommand = new DynamicGuildSlashCommandHandler().addHandler(async (ctx) => {
// ctx.commandName is the name Discord sent, unknown to Honocord ahead of time
const definition = await db.customCommands.findOne({ guildId: ctx.guildId, name: ctx.commandName });
if (!definition) {
// reply() is ephemeral by default
await ctx.reply("This command is no longer configured.");
return;
}
await ctx.reply(definition.response);
});
```
### Autocomplete
Dynamic slash handlers support autocomplete the same way `SlashCommandHandler` does:
```ts
customCommand.addAutocompleteHandler(async (ctx) => {
const focused = ctx.options.getFocused();
const results = await db.customCommandOptions.search(ctx.commandName, focused.value);
await ctx.respond(results.map((r) => ({ name: r, value: r })));
});
```
## Context Menu Commands
A single dynamic context handler receives **both** User and Message context interactions — narrow with `isOfType`:
```ts
import { DynamicGuildContextCommandHandler } from "honocord";
import { ApplicationCommandType } from "discord-api-types/v10";
const customContextCommand = new DynamicGuildContextCommandHandler().addHandler(async (ctx) => {
if (ctx.isOfType(ApplicationCommandType.User)) {
await ctx.reply(`Ran on user ${ctx.targetUser.username}`);
} else if (ctx.isOfType(ApplicationCommandType.Message)) {
await ctx.reply(`Ran on message ${ctx.targetMessage.id}`);
}
});
```
## Global Fallback
Register a global dynamic handler to catch anything the guild-scoped one (or a DM invocation) doesn't:
```ts
import { DynamicGlobalSlashCommandHandler } from "honocord";
const globalFallback = new DynamicGlobalSlashCommandHandler().addHandler(async (ctx) => {
console.warn(`Unrecognized command "${ctx.commandName}"`);
await ctx.reply("This command isn't available right now.");
});
```
## Loading
Load dynamic handlers like any other handler:
```ts
bot.loadHandlers(customCommand, customContextCommand, globalFallback);
```
A dynamic handler being registered is enough on its own to mount the interactions route — you don't need at least one named
`SlashCommandHandler`/`ContextCommandHandler` loaded too.
# Custom ID System
Honocord uses a path-based custom ID system for components and modals:
```
prefix/component/path?param1/param2/param3
```
The custom ID is split into two parts:
- **Path**: The part before the `?`, split by `/`. The first item is the **prefix** used for matching handlers. The rest form the **component path**.
- **Parameters**: The part after the `?`, split by `/`. These are additional parameters you can use in your handler.
You must mind the limit of 100 characters for `custom_id`s imposed by Discord.
**Example:**
```ts
import { ComponentHandler, ButtonBuilder, parseCustomId } from "honocord";
new ButtonBuilder().setCustomId("report/user?123456789").setLabel("Report User");
// Handler matches by prefix
const reportHandler = new ComponentHandler("report").addHandler(async (interaction) => {
const { component, firstParam, compPath } = parseCustomId(interaction.custom_id);
// component = "user"
// firstParam = "123456789"
// compPath = ["report", "user"]
});
```
This enables:
- **Prefix matching** - One handler for multiple related components
- **Parameter passing** - Pass data through custom IDs
- **Hierarchical organization** - Structure your component logic
It is recommended to make factory functions for creating components with complex custom IDs to avoid mistakes.
(I can tell you from experience that typos in custom IDs are a thing...)
**Example:**
```ts
const ReportButton = (userId: string) => new ButtonBuilder().setCustomId(`report/user?${userId}`).setLabel("Report User");
```
# Working with Modals
Modals can be sent when the interaction is a modal-capable interaction - a slash or context command, or a message component interaction.
## Sending a Modal
To send a modal, you can use the `interaction.showModal()` method. This method takes either a `ModalBuilder` instance or a raw `ModalInteractionResponseCallbackData` object.
If you wanna send the new checkbox, checkbox-group and radio-group components, you **need** to use the raw object instead of the
builder, as the builders from `@discordjs/builders` do not support these components yet. However receiving the data from these
components works just fine.
```ts
import { ModalBuilder, LabelBuilder, TextInputStyle } from "honocord";
const modal = new ModalBuilder()
.setCustomId("my-modal")
.setTitle("My Modal")
.addLabelComponents(
new LabelBuilder()
.setLabel("Name")
.setDescription("Enter your name")
.setTextInputComponent((tiBuilder) => tiBuilder.setCustomId("name").setStyle(TextInputStyle.Short).setRequired(true))
);
interaction.showModal(modal);
```
```ts
import type { ModalInteractionResponseCallbackData } from "honocord";
const modalData: ModalInteractionResponseCallbackData = {
title: "Test Modal",
custom_id: "test_modal",
components: [
{
type: ComponentType.Label,
label: "This is a label",
component: {
type: ComponentType.Checkbox,
custom_id: "checkbox_1",
},
},
{
type: ComponentType.Label,
label: "This is a text input",
component: {
type: ComponentType.CheckboxGroup,
custom_id: "checkbox_group_1",
options: [
{
label: "Option 1",
description: "This is option 1",
value: "option_1",
},
{
label: "Option 2",
value: "option_2",
},
],
},
},
{
type: ComponentType.Label,
label: "This is a select menu",
component: {
type: ComponentType.RadioGroup,
custom_id: "radio_group_1",
options: [
{
label: "Option A",
description: "This is option A",
value: "option_a",
},
{
label: "Option B",
value: "option_b",
},
],
},
},
],
};
interaction.showModal(modalData);
```
Check out the full component reference by Discord for more details on the available components and their properties.
# Sending Files
Sending files in Discord requires two things to be present in your request: the **binary file data** (sent as multipart form fields) and the **attachment metadata** (sent as JSON). The `AttachmentBuilder` class handles both for you.
## The AttachmentBuilder
Use `AttachmentBuilder` to describe a file you want to send. It accepts any `Buffer`, `Uint8Array`, `string`, or `Stream` as the file data.
```ts
import { AttachmentBuilder } from "honocord";
const attachment = new AttachmentBuilder(Buffer.from("Hello, world!"), {
name: "hello.txt",
description: "A simple text file",
});
```
Use the fluent builder methods to configure the attachment:
| Method | Description |
| ----------------------- | --------------------------------------------------- |
| `.setName(name)` | Sets the filename shown in Discord |
| `.setDescription(desc)` | Sets the alt-text / description |
| `.setContentType(type)` | Overrides the MIME type (e.g. `"application/json"`) |
| `.setSpoiler(true)` | Prefixes the filename with `SPOILER_` |
## Sending with a Reply
Pass your `AttachmentBuilder` instance(s) directly into the `files` field of any response method. `reply`, `editReply`, `followUp`, and `update` all accept it.
```ts
await ctx.reply({
content: "Here is your file!",
files: [new AttachmentBuilder(Buffer.from(data), { name: "output.txt" })],
});
```
```ts
await ctx.reply({
content: "Here are your files!",
files: [
new AttachmentBuilder(Buffer.from(dataA), { name: "file-a.txt" }),
new AttachmentBuilder(Buffer.from(dataB), { name: "file-b.txt" }),
],
});
```
## Referencing Files in Embeds
Once a file is attached, you can reference it inside an embed using the `attachment://filename` URI scheme. This is useful for embed thumbnails or images.
```ts
await ctx.reply({
embeds: [
{
title: "Preview",
image: { url: "attachment://chart.png" },
},
],
files: [new AttachmentBuilder(imageBuffer, { name: "chart.png" })],
});
```
The filename in `attachment://` must exactly match the `name` set on the `AttachmentBuilder`, including the file extension.
## Marking Files as Spoilers
Call `.setSpoiler()` to hide the file behind a spoiler warning in Discord. This prefixes the filename with `SPOILER_` automatically.
```ts
const attachment = new AttachmentBuilder(imageBuffer, { name: "surprise.png" }).setSpoiler();
// attachment name is now "SPOILER_surprise.png"
```
You can toggle the spoiler off again by calling `.setSpoiler(false)`.
## Using the REST Client Directly
Since v2.0.0 you can use the re-exported `REST` class (from `@discordjs/rest`) to send messages with attachments.
If you need to post a message directly via the REST client rather than through an interaction method, use `AttachmentBuilder.resolve()`
to split your builders into the `files` and `attachments` arrays that the REST client expects.
1. Build your attachments as normal.
```ts
const builders = [new AttachmentBuilder(Buffer.from(data), { name: "report.txt" })];
```
2. Resolve them into the two separate arrays.
```ts
const { files, attachments } = AttachmentBuilder.resolve(builders);
```
3. Pass `files` as a top-level REST option and `attachments` inside `body`.
```ts
await rest.post(`/channels/${channelId}/messages`, {
body: {
content: "Here is your report!",
attachments,
},
files,
});
```
Do **not** place `files` inside `body`. The `files` array must be a top-level option on the REST call so the client can build
the correct `multipart/form-data` request. Putting it inside `body` will serialize it as JSON and the binary data will never be
uploaded.
## Using an API instance
Since v2.0.0 you can also use the `API` class to send messages with attachments. This class is re-exported from `@discordjs/core/http-only`
and provides a higher-level interface over the REST client.
```ts
import { REST, API, AttachmentBuilder } from "honocord";
const rest = new REST().setToken("your-bot-token");
const api = new API(rest);
await api.channels.createMessage(channelId, {
content: "Here is your file!",
...new AttachmentBuilder(Buffer.from(data), { name: "report.txt" }).resolve(),
});
```
View an example of using AttachmentBuilder in a real implementation, along with other Honocord features.
# Webhook Events
Webhook events allow your app to receive notifications from Discord about events happening in your application, such as entitlement purchases, lobby messages, or app authorizations. Unlike Gateway events, webhook events are sent over HTTP and don't require maintaining a persistent connection.
## What are Webhook Events?
Webhook events are one-way HTTP notifications sent from Discord to your app when specific events occur. They differ from interactions in several key ways:
| Feature | Interactions | Webhook Events |
| ------------- | ----------------------- | ------------------------------------------- |
| Direction | User → Your App | Discord → Your App |
| Purpose | Handle user actions | Receive event notifications |
| Response Time | 3 seconds | 3 seconds (acknowledgment) |
| Examples | Slash commands, buttons | Application authorized, Entitlement created |
Webhook events are **not** the same as [incoming webhooks](https://docs.discord.com/developers/resources/webhook). Incoming
webhooks allow external services to post messages to Discord. Webhook events (outgoing webhooks) notify your app about Discord
events.
## Setting Up Webhook Events
1. **Create a WebhookEventHandler**
Choose the event type you want to handle from `ApplicationWebhookEventType`:
```ts
import { WebhookEventHandler } from "honocord";
import { ApplicationWebhookEventType } from "discord-api-types/v10";
const entitlementHandler = new WebhookEventHandler(ApplicationWebhookEventType.EntitlementCreate);
entitlementHandler.addHandler(async (c) => {
const entitlement = c.var.data;
console.log(`New entitlement: ${entitlement.id}`);
// Process the entitlement...
return c.body(null, 200); // empty response to acknowledge receipt
});
```
2. **Load the handler into Honocord**
```ts
import { Honocord } from "honocord";
const bot = new Honocord();
bot.loadHandlers(entitlementHandler);
export default bot.getApp(); // Webhook available at /webhook
```
3. **Configure Discord Developer Portal**
- Navigate to your [app's settings](https://discord.com/developers/applications)
- Go to the **Webhooks** page
- Enter your public URL: `https://your-domain.com/webhook`
- Enable Events and select the events you want to receive
- Click **Save Changes**
Discord will verify your endpoint by sending a PING event.
## Standard vs Worker Mode
Honocord supports two modes for webhook handlers, optimized for different deployment environments.
### Standard Mode (Default)
In standard mode, your handler **must return a Response object**. This gives you full control over the response sent to Discord.
```ts
const handler = new WebhookEventHandler(
ApplicationWebhookEventType.LobbyMessageCreate
// Standard mode (default)
);
handler.addHandler(async (c) => {
const message = c.var.data;
// Validate or process...
if (!message.content) {
return c.json({ error: "No content" }, 400);
}
// Must return Response
return c.json({ ok: true });
});
```
**Use standard mode when:**
- Running on traditional servers (Node.js, Bun)
- You need custom response codes or bodies
- You want full control over the response
### Worker Mode (Cloudflare Workers)
In worker mode, you **don't need to return anything**. Honocord automatically responds with `200 OK` to Discord and processes your handler asynchronously using `waitUntil`.
```ts
const handler = new WebhookEventHandler(
ApplicationWebhookEventType.EntitlementCreate,
true // Enable worker mode
);
handler.addHandler(async (c) => {
const entitlement = c.var.data;
// Process asynchronously - no return needed
await logToDatabase(entitlement);
await notifyUser(entitlement.user_id);
// No return statement required!
});
```
**Use worker mode when:**
- Deploying to Cloudflare Workers
- Processing takes longer than 3 seconds
- You want fire-and-forget processing
- You don't need custom response codes
Please take into account that a Cloudflare worker still has a
[limits](https://developers.cloudflare.com/workers/platform/limits) you need to respect!
## Available Event Types
Discord supports various webhook event types. Here are the most common:
### Monetization Events
Monitor entitlement lifecycle for in-app purchases:
```ts
const entitlementCreate = new WebhookEventHandler(ApplicationWebhookEventType.EntitlementCreate);
const entitlementUpdate = new WebhookEventHandler(ApplicationWebhookEventType.EntitlementUpdate);
const entitlementDelete = new WebhookEventHandler(ApplicationWebhookEventType.EntitlementDelete);
```
### Authorization Events
Track when users add or remove your app:
```ts
const authHandler = new WebhookEventHandler(ApplicationWebhookEventType.ApplicationAuthorized);
authHandler.addHandler(async (c) => {
const auth = c.var.data;
console.log(`App authorized by ${auth.user.username}`);
if (auth.guild) {
console.log(`Added to guild: ${auth.guild.name}`);
}
return c.json({ ok: true });
});
const deauthHandler = new WebhookEventHandler(ApplicationWebhookEventType.ApplicationDeauthorized);
```
**With custom types:**
```ts
interface MyEnv {
DISCORD_PUBLIC_KEY: string;
DATABASE: D1Database;
}
interface MyVariables {
userId: string;
}
// Specify types explicitly - T is inferred from constructor, then Env and Variables
const authHandler = new WebhookEventHandler(
ApplicationWebhookEventType.ApplicationAuthorized
);
authHandler.addHandler(async (c) => {
// c.env is now typed as MyEnv
const db = c.env.DATABASE;
// c.var includes both MyVariables and data
const auth = c.var.data;
return c.json({ ok: true });
});
```
The `ApplicationDeauthorized` event is **only sent** if the bot is removed as a user-installable app! If your bot is only
guild-installed, this event wil**l not be sent!** (Blame Discord)
### Lobby & Direct Message Events
For apps using the Discord Social SDK:
```ts
// Lobby messages
const lobbyCreate = new WebhookEventHandler(ApplicationWebhookEventType.LobbyMessageCreate);
const lobbyUpdate = new WebhookEventHandler(ApplicationWebhookEventType.LobbyMessageUpdate);
const lobbyDelete = new WebhookEventHandler(ApplicationWebhookEventType.LobbyMessageDelete);
// Game direct messages
const dmCreate = new WebhookEventHandler(ApplicationWebhookEventType.GameDirectMessageCreate);
```
### Complete List
All available webhook event types:
- `APPLICATION_AUTHORIZED`
- `APPLICATION_DEAUTHORIZED`
- `ENTITLEMENT_CREATE`
- `ENTITLEMENT_UPDATE`
- `ENTITLEMENT_DELETE`
- `QUEST_USER_ENROLLMENT` (currently unavailable)
- `LOBBY_MESSAGE_CREATE`
- `LOBBY_MESSAGE_UPDATE`
- `LOBBY_MESSAGE_DELETE`
- `GAME_DIRECT_MESSAGE_CREATE`
- `GAME_DIRECT_MESSAGE_UPDATE`
- `GAME_DIRECT_MESSAGE_DELETE`
## Accessing Event Data
Event data is available via `c.var.data` / `c.get("data")` in your handler:
```ts
handler.addHandler(async (c) => {
const eventData = c.var.data; // c.get("data") also works
// Type is automatically inferred based on event type
// For EntitlementCreate, eventData is an Entitlement object
console.log(eventData.id);
console.log(eventData.sku_id);
console.log(eventData.user_id);
return c.json({ ok: true });
});
```
The context object also provides:
- `c.env` - Environment variables (including `DISCORD_PUBLIC_KEY`)
- `c.req` - The original request object
- `c.set()` / `c.get()` - Custom context variables
## Security
Honocord automatically handles request verification for you:
1. **Signature Validation** - Verifies `X-Signature-Ed25519` header using your `DISCORD_PUBLIC_KEY`
2. **Timestamp Validation** - Checks `X-Signature-Timestamp` to prevent replay attacks
3. **PING Responses** - Automatically responds to Discord's PING verification
All you need to do is provide `DISCORD_PUBLIC_KEY` in your environment variables.
If signature validation fails, Honocord returns `401 Unauthorized`. Discord will retry failed requests multiple times, and may
disable your webhook endpoint if validation fails too often.
## Standalone Usage
You can use `WebhookEventHandler` independently of Honocord (standard mode only):
```ts
import { Hono } from "hono";
import { WebhookEventHandler } from "honocord";
const handler = new WebhookEventHandler(ApplicationWebhookEventType.EntitlementCreate);
handler.addHandler(async (c) => {
// Process event
return c.json({ ok: true });
});
// Option 1: As a fetch handler
export default {
fetch: handler.fetch.bind(handler),
};
// Option 2: Mount in Hono app
const app = new Hono();
app.route("/webhooks", handler.getApp());
export default app;
```
Worker mode handlers cannot use `fetch()` or `getApp()` - they must be used with Honocord's `webhookHandler`.
## Typings
The types for `WebhookEventHandler` are designed to provide strong type safety,
however it gets a littlemore complex when you start adding custom bindings and variables.
If you want to use custom `Bindings` and `Variables`, you **need** to specify the first 4 type parameters, even if you want to use the defaults for some of them. For example:
```ts
const handler = new WebhookEventHandler(
ApplicationWebhookEventType.ApplicationAuthorized
);
```
I'm working on improving the ergonomics of this, but this is a limitation of how TypeScript infers types from constructor arguments.
If you have any suggestions on improving this, please let me know!
## Troubleshooting
### Endpoint Not Verifying
Ensure:
- Your URL is publicly accessible
- `DISCORD_PUBLIC_KEY` is correctly set
- Your app responds within 3 seconds
- You're returning proper status codes (if using standard mode)
### Events Not Being Received
Check:
- Events are enabled in Developer Portal
- Specific event types are selected
- Your endpoint hasn't been disabled due to too many failures
- Request signatures are being validated correctly
### Events being received multiple times in a short time
This is likely due to your handler not responding in time. If using standard mode, make sure to return a response within 3 seconds.
If processing takes longer and you are on Workers, switch to worker mode to avoid timeouts and retries:
If using standard mode on CF Workers, switch to worker mode:
```ts
// Before (may timeout)
const handler = new WebhookEventHandler(ApplicationWebhookEventType.EntitlementCreate);
// After (won't timeout)
const handler = new WebhookEventHandler(
ApplicationWebhookEventType.EntitlementCreate,
true // Worker mode
);
```
## Learn More
Official Discord documentation for webhook events
Detailed API documentation for WebhookEventHandler
View an example of using AttachmentBuilder in a real implementation, along with other Honocord features.
# Caching
Honocord uses a modular caching system that allows you to easily integrate different caching backends, such as in-memory, Durable Objects, MongoDB, or your own custom implementation.
This guide will walk you through the basics of Honocord's caching system, how to set it up, and best practices for using it in your implementation.
## Cache Adapters
Honocord provides several built-in cache adapters:
- [`MemoryCacheAdapter`](https://github.com/The-LukeZ/honocord/tree/dev/src/cache/memory) (`honocord/cache/memory`) - A simple in-memory cache adapter for quick caching needs
- [`DurableObjectCacheAdapter`](https://github.com/The-LukeZ/honocord/tree/dev/src/cache/do) (`honocord/cache/do`) - A cache adapter that uses Cloudflare Durable Objects for caching on Workers
- [`MongoCacheAdapter`](https://github.com/The-LukeZ/honocord/tree/dev/src/cache/mongo) (`honocord/cache/mongo`) - A cache adapter that uses MongoDB for caching
You can also create your own custom cache adapter by extending the abstract [`BaseCacheAdapter`](https://github.com/The-LukeZ/honocord/tree/dev/src/cache) class from `honocord/cache`.
It is important to note that you cannot use every adapter in every environment.
| Adapter | Cloudflare Workers | Node.js / Bun |
| ------------------------- | ------------------ | ------------- |
| MemoryCacheAdapter | ❌ | ✅ |
| DurableObjectCacheAdapter | ✅ | ❌ |
| MongoCacheAdapter \* | ? | ✅ |
\* I'm not really sure about this one, it could work on CF Workers, but I haven't tested it yet. If you try it out, let me know how it goes!
## Setting Up Caching
Every caching setup is basically the same, as you have to use the `withCache` method on the `Honocord` instance to provide a factory function that creates your cache adapter.
Only the setup before that may vary slightly based on the adapter.
### Installation
All adapters ship with the `honocord` package as subpath exports, so there is nothing extra to install.
The only exception is the MongoDB adapter, which needs `mongoose` (an optional peer dependency):
```bash
npm install mongoose
pnpm add mongoose
yarn add mongoose
bun add mongoose
```
### Usage
If you are on Cloudflare Workers, you **have** to use the `DurableObjectCacheAdapter`, as it is the only adapter that works in
that environment.
```ts
import { Honocord } from "honocord";
import { MemoryCacheAdapter } from "honocord/cache/memory";
const cache = new MemoryCacheAdapter({
ttl: 300,
cleanupInterval: 600, // Interval in seconds for automatic cleanup of expired entries. This is only supported by this adapter as of now.
});
const bot = new Honocord().withCache(() => cache);
```
This setup requires a bit more work, as you need to set up a Durable Object and bind it to your Worker.
**Honocord setup**
```ts title="src/index.ts"
import { Honocord } from "honocord";
import { DurableObjectCacheAdapter } from "honocord/cache/do";
const bot = new Honocord().withCache((env) => new DurableObjectCacheAdapter(env.MY_CACHE_DO));
export default bot.getApp();
export { HonocordCacheDO } from "honocord/cache/do"; // You need to export the Durable Object class so you can use it
```
**Worker setup**
```ts title="wrangler.jsonc"
{
// ... other config options
"durable_objects": {
"bindings": [
{
"name": "MY_CACHE_DO", // This is the binding name that is used by the `env` in the factory function
"class_name": "HonocordCacheDO" // This is the class you exported from your index.ts file
}
]
},
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": ["HonocordCacheDO"] // This is the class you exported from your index.ts file
}
]
}
```
- `migrations` are required to create the Durable Object namespace - you don't need to write any migration code, just having this here is enough for Wrangler to create the namespace for you
Why do I need to export the Durable Object class?
You might ask, why do I need to export the Durable Object class from my `index.ts` file?
CF Workers is a edge runtime, which means that you don't have any in-memory state that persists across requests.
A Durable Object is a special type of object that runs on the edge and can maintain state across requests, but it needs to be defined in **your** code because it is a part of your Worker, not Honocord itself.
Honocord already does the heavy lifting of implementing the Durable Object and providing an adapter for it, but you still need to define it in your code so that Wrangler can create the namespace for it.
```ts
import { Honocord } from "honocord";
import { MongoCacheAdapter } from "honocord/cache/mongo";
const cache = new MongoCacheAdapter(process.env.MONGO_URI!);
await cache.connect(); // You need to connect to the database before using the cache adapter
const bot = new Honocord().withCache(() => cache);
```
This is fairly straightforward, you just need to make sure to provide the correct MongoDB URI before using the cache adapter.
You can either self-host a MongoDB instance or use a cloud provider like MongoDB Atlas.
## Migrating from @honocord/cache-\* packages
The separate `@honocord/cache-*` packages have been merged into the `honocord` package. Export names are unchanged, only the import paths differ:
| Old import | New import |
| ------------------------ | ----------------------- |
| `@honocord/cache-base` | `honocord/cache` |
| `@honocord/cache-memory` | `honocord/cache/memory` |
| `@honocord/cache-do` | `honocord/cache/do` |
| `@honocord/cache-mongo` | `honocord/cache/mongo` |
1. Uninstall the old packages, e.g. `pnpm remove @honocord/cache-base @honocord/cache-memory @honocord/cache-do @honocord/cache-mongo` (only the ones you installed).
2. Update your imports to the new paths from the table above.
3. If you use the MongoDB adapter, keep `mongoose` installed in your project.
## Working with the Cache
The cache polulates automatically every time an interaction is received.
However, some things are not automatically cached due to Discord only providing partial objects in certain cases. This includes:
- Guilds - Discord only sends a partial guild object with id, features and the preferred locale; This doesn't need to be cached.
- Resolved Channels - When a user interacts with a message component or a modal, and it has a channel select menu where resolved channels are included in the interaction data, those channels are not automatically cached.
These channels are only partial and don't include any useful information other than the ID and type.
## Under the Hood
As you can see, you effectivly only have to interact with the `CacheManager`. The `CacheManager` is responsible for managing the different namespaces and providing a unified interface for accessing the cache.
When you call `ctx.cache.getUser(userId)`, the `CacheManager` will delegate the call to the appropriate namespace accessor, which will then interact with the underlying cache adapter to retrieve the data.
## Custom Cache Adapters
If you write a custom cache adapter, you only need to extend the abstract `BaseCacheAdapter` class from `honocord/cache` and implement the required methods.
This is a very basic implementation of a Redis cache adapter. It does not handle errors, connection pooling, or other advanced features. It is only meant to serve as an example of how to implement a custom cache adapter.
A Redis cache adapter might be provided officially in the future if there is enough demand for it, but for now you can use this implementation as a starting point for your own custom cache adapter.
```ts
import { BaseCacheAdapter, type CacheEntry, type CacheOptions } from "honocord/cache";
import Redis from "iovalkey"; // works for both Valkey AND Redis
export class RedisCacheAdapter extends BaseCacheAdapter {
private client: Redis;
private ready: Promise;
private options: CacheOptions;
constructor(urlOrOptions: string | Redis.RedisOptions, options: CacheOptions = {}) {
super();
this.options = options;
this.client = new Redis(urlOrOptions as any);
this.ready = new Promise((resolve, reject) => {
this.client.once("ready", resolve);
this.client.once("error", reject);
});
}
async connect(): Promise {
await this.ready;
return this;
}
async get(key: string): Promise {
await this.ready;
const val = await this.client.get(this.withNamespace(key));
if (!val) return null;
return JSON.parse(val) as T;
}
async set(key: string, value: T, ttlMs?: number): Promise {
await this.ready;
const serialized = JSON.stringify(value);
const ttl = this.resolveTtl(ttlMs);
if (ttl) {
await this.client.set(this.withNamespace(key), serialized, "PX", ttl); // PX = milliseconds TTL
} else {
await this.client.set(this.withNamespace(key), serialized);
}
}
async mset(entries: CacheEntry[]): Promise {
await this.ready;
if (entries.length === 0) return;
const pipeline = this.client.pipeline();
for (const { key, value, ttlMs } of entries) {
const serialized = JSON.stringify(value);
const ttl = this.resolveTtl(ttlMs);
if (ttl) {
pipeline.set(this.withNamespace(key), serialized, "PX", ttl);
} else {
pipeline.set(this.withNamespace(key), serialized);
}
}
await pipeline.exec();
}
async delete(key: string): Promise {
await this.ready;
await this.client.del(this.withNamespace(key));
}
async has(key: string): Promise {
await this.ready;
const count = await this.client.exists(this.withNamespace(key));
return count === 1;
}
async clear(): Promise {
await this.ready;
await this.client.flushdb();
}
private withNamespace(key: string): string {
return this.options.namespace ? `${this.options.namespace}:${key}` : key;
}
private resolveTtl(ttlMs?: number): number | undefined {
if (ttlMs) return ttlMs;
return this.options.ttl ? this.options.ttl * 1000 : undefined; // ttl option is in seconds
}
}
```
Then use it with Honocord just like any built-in adapter:
```ts
import { Honocord } from "honocord";
import { RedisCacheAdapter } from "./RedisCacheAdapter";
const cache = new RedisCacheAdapter(process.env.REDIS_URL!, {
namespace: "my-bot",
ttl: 300, // 5-minute default TTL
});
await cache.connect(); // You can also don't do this and let Honocord handle connecting, but doing it yourself allows you to catch connection errors at startup
const bot = new Honocord().withCache(() => cache);
```
## Fetching
On every interaction, you have a property `.fetcher` which is an instance of `Fetcher`.
The `Fetcher` is a utility class that provides methods for fetching data from the Discord API and automatically caching it, if not already cached.
For example, if you want to fetch a user by their ID, you can do:
```ts
const user = await ctx.fetcher.users.get(userId);
```
This will first check if the user is already cached, and if so, it will return the cached user. If not, it will fetch the user from the Discord API, cache it, and then return it.
Because not all endpoints are cachable (only the ones supported by the cache manager), the `Fetcher` has the property `api` which provides direct access to the Discord API without caching.
This is an instance of [API](https://discord.js.org/docs/packages/core/2.4.0/API:Class) from discord.js, so you can use it to make any API calls that are not supported by the cache manager.
This is a high-level wrapper around the raw REST API, so it will handle things like rate limits and retries for you.
```ts
const sticker = await ctx.fetcher.api.stickers.get(stickerId); // This won't be cached
```
# Cloudflare Workers
Hono is designed (primarily) for Cloudflare Workers, while Honocord works well with handling async interactions automatically to fit within Workers' limits.
## Why Cloudflare Workers?
- **Global edge deployment** with low latency.
- **Generous free tier** (100k requests/day).
- **No cold starts**, instant scaling.
- Honocord auto-manages async via `waitUntil`.
A complete bot deployed on Cloudflare Workers.
## Project Setup
1. **Initialize**
```bash
pnpm create cloudflare@latest my-discord-bot
cd my-discord-bot
pnpm add honocord hono
```
2. **`wrangler.jsonc`**
```jsonc
{
"name": "my-discord-bot",
"main": "src/index.ts",
"compatibility_date": "2024-01-01",
"compatibility_flags": ["nodejs_compat"],
"vars": {
"IS_CF_WORKER": "true",
},
}
```
Starting with v2.0.0 it is required to have the `compatibility_flags` present in your `wrangler.jsonc` for Honocord to work
properly. There is one usage of `node:path` for the new uploading files feature, and without the `nodejs_compat` flag,
Workers won't be able to resolve this module and will throw an error when building.
3. **Bot Entry Point**
```ts title="src/index.ts"
import { Honocord } from "honocord";
import * as handlers from "./handlers";
const bot = new Honocord({ isCFWorker: true }); // Auto-detected via IS_CF_WORKER
bot.loadHandlers(...Object.values(handlers));
export default bot.getApp(); // Export as Worker fetch handler
```
4. **Example Handler**
```ts title="src/handlers.ts"
import { SlashCommandHandler } from "honocord";
export const pingCommand = new SlashCommandHandler()
.setName("ping")
.setDescription("Check bot latency")
.addHandler(async (interaction) => {
await interaction.reply("🏓 Pong!");
});
```
#### Secrets
Never use plain environment variables for sensitive data.
```bash
npx wrangler secret put DISCORD_TOKEN
npx wrangler secret put DISCORD_PUBLIC_KEY
npx wrangler secret put DISCORD_APPLICATION_ID
```
Or have an `.env` file and bulk upload your secrets with:
```bash
npx wrangler secret bulk .env
```
#### Local Development
```bash
wrangler dev # Runs at http://localhost:8787
```
To expose your local environment publicly for Discord's verification:
```bash
cloudflared tunnel --url http://localhost:8787 # Recommended
# or
ngrok http 8787
```
## Production Deployment
1. **Deploy**
```bash
pnpm run deploy # Outputs your Worker URL, e.g., https://my-discord-bot.username.workers.dev/
```
2. **Register Commands**
Run this locally, not on the Worker itself.
```ts title="src/register.ts"
import { registerCommands } from "honocord";
import * as handlers from "./handlers/index"; // Assuming you have a src/handlers/index.ts file
await registerCommands(process.env.DISCORD_TOKEN!, process.env.DISCORD_APPLICATION_ID!, Object.values(handlers));
```
```json title="package.json"
{
"scripts": {
"register": "tsx --env-file=.env src/register.ts"
},
"devDependencies": {
"tsx": "latest"
}
}
```
Then run with `pnpm register`.
3. **Discord Setup**
1. In the **Discord Developer Portal** → Your App → General Information.
2. Set **Interactions Endpoint URL** to your Worker URL (e.g., `https://.../interactions`).
3. Save changes. Discord will automatically send a POST request to verify the URL.
## Type Safety (optional but recommended)
When you deploy on Workers, you should use the wrangler script `cf-typegen` automatically provided upon project creation.
This creates a `worker-configuration.d.ts` file which exports an `Env` interface which you can use in your project.
```ts title="src/types.ts"
import type { BaseInteractionContext } from "honocord";
// `Env` is from the types generated by wrangler
type WorkerEnv = Env;
export type MyVariables = {
// Your custom Hono variables here
};
type MyContext = BaseInteractionContext;
```
Usage in a handler:
```typescript
import type { Context } from "./types";
// ... inside handler ...
await interaction.context.env.MY_KV.get("key");
// Note: Don't confuse .context (the Hono Context) with .contexts (Discord Interaction Context)
```
[**See a full example here**](https://github.com/The-LukeZ/honocord-examples/tree/main/examples/cloudflare-workers)
## Best Practices
- **Use secrets only** for sensitive data.
- **Keep handlers lightweight** (≤50ms CPU time on the free plan).
- **Store data** in Workers KV, D1, or Durable Objects.
- **Monitor** logs with `wrangler tail`.
- **Update** `compatibility_date` on a regular basis.
## Common Issues
- **CPU limit exceeded**: Split heavy work or use Durable Objects. Alternatively, upgrade to the Workers Paid plan.
- **Verification fails**: Double-check your public key, ensure the URL is correct (including any path like `/interactions`), and ensure the Worker is deployed.
- **Module not found**: Ensure you are using the correct relative paths and file extensions in your imports.
# Cloudflare Tunnel for Local Development
## Quick Setup
1. **Install cloudflared**
[Download](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/) and
install the Cloudflare Tunnel client (cloudflared) for your operating system
2. **Run a quick tunnel** (no setup required)
Execute `cloudflared tunnel --url http://localhost:8787` to instantly expose your local Worker (typically running on port 8787)
3. **Access via free domain**
Cloudflare automatically generates a random subdomain like `https://wise-juvenile-pink-recovered.trycloudflare.com`
## Using Your Own Domain (Optional)
If you want a custom domain instead of the random subdomain:
1. **Authenticate** - Run `cloudflared tunnel login` to authorize with your Cloudflare account
2. **Create named tunnel** - Execute `cloudflared tunnel create mytunnel` to generate a persistent tunnel with **UUID**
3. **Configure routing** - Create `~/.cloudflared/config.yml` specifying your tunnel ID, credentials file, and hostname mapping to localhost:port
```yaml title="~/.cloudflared/config.yml"
tunnel:
credentials-file: /path/to/credentials-file.json
ingress:
- hostname: dev.yourdomain.com
service: http://localhost:8787
- service: http_status:404
```
On Windows, this file is located at `C:\Users\\.cloudflared\config.yml`.
4. **Set DNS record** - Run `cloudflared tunnel route dns mytunnel dev.yourdomain.com` to create the DNS entry
5. **Run tunnel** - Execute `cloudflared tunnel run mytunnel` to start the tunnel
## Does Cloudflare Provide a Domain?
**Yes** - When you run the quick tunnel command without authentication, Cloudflare automatically generates a free `trycloudflare.com` subdomain for you. However, this is a random subdomain that changes each time.
If you want a permanent custom domain (like `dev.yourdomain.com`), you need to own a domain and use Cloudflare's nameservers.
# Reference overview
## Variable Types
Fields that are optional and can be `undefined` are suffixed with `?`. Field values that can be `null` are prefixed with a `?`.
### Example
| Field Name | Type |
| ------------------------- | ------- |
| optionalField? | string |
| nullableField | ?string |
| nullableAndOptionalField? | ?string |
# AttachmentBuilder
Defined in: [structures/AttachmentBuilder.ts:10](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L10)
Builder for message attachments, which can be used in several response methods across the library.
## Constructors
### Constructor
> **new AttachmentBuilder**(`attachment`, `data?`): `AttachmentBuilder`
Defined in: [structures/AttachmentBuilder.ts:21](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L21)
#### Parameters
##### attachment
`Stream` \| [`BufferResolvable`](/reference/types/BufferResolvable)
The file content — a Buffer, Uint8Array, string path, or readable stream.
##### data?
[`AttachmentData`](/reference/types/AttachmentData) = `{}`
Optional metadata (name, description, content type, reference key).
#### Returns
`AttachmentBuilder`
## Accessors
### spoiler
#### Get Signature
> **get** **spoiler**(): `boolean`
Defined in: [structures/AttachmentBuilder.ts:68](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L68)
Whether the attachment's filename is currently marked as a spoiler.
##### Returns
`boolean`
## Methods
### resolve()
> **resolve**(): `object`
Defined in: [structures/AttachmentBuilder.ts:100](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L100)
Resolves this builder into the parallel `files` and `attachments` arrays ready to spread into your API call options.
#### Returns
`object`
##### attachments
> **attachments**: `RESTAPIAttachment`[]
##### files
> **files**: [`RawFile`](/reference/types/RawFile)[]
#### Example
```ts
const { files, attachments } = builder.resolve();
await interaction.reply({ content: "Here!", files, attachments });
// or even shorter:
await interaction.reply({ content: "Here!", ...builder.resolve() });
```
***
### setContentType()
> **setContentType**(`contentType`): `this`
Defined in: [structures/AttachmentBuilder.ts:35](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L35)
Sets the attachment's MIME content type.
#### Parameters
##### contentType
`string`
#### Returns
`this`
***
### setDescription()
> **setDescription**(`description`): `this`
Defined in: [structures/AttachmentBuilder.ts:30](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L30)
Sets the attachment's alt-text description.
#### Parameters
##### description
`string`
#### Returns
`this`
***
### setFile()
> **setFile**(`attachment`): `this`
Defined in: [structures/AttachmentBuilder.ts:45](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L45)
Replaces the attachment's file content.
#### Parameters
##### attachment
`Stream` \| [`BufferResolvable`](/reference/types/BufferResolvable)
#### Returns
`this`
***
### setKey()
> **setKey**(`key`): `this`
Defined in: [structures/AttachmentBuilder.ts:40](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L40)
Sets a custom reference key for your own use — not sent to Discord.
#### Parameters
##### key
`string`
#### Returns
`this`
***
### setName()
> **setName**(`name`): `this`
Defined in: [structures/AttachmentBuilder.ts:50](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L50)
Sets the attachment's filename.
#### Parameters
##### name
`string`
#### Returns
`this`
***
### setSpoiler()
> **setSpoiler**(`spoiler?`): `this`
Defined in: [structures/AttachmentBuilder.ts:56](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L56)
Marks (or unmarks) the attachment as a spoiler by prefixing/stripping `SPOILER_` from its filename.
#### Parameters
##### spoiler?
`boolean` = `true`
#### Returns
`this`
***
### toRawFile()
> **toRawFile**(): [`RawFile`](/reference/types/RawFile)
Defined in: [structures/AttachmentBuilder.ts:73](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L73)
Produces the multipart file part (files[n])
#### Returns
[`RawFile`](/reference/types/RawFile)
***
### toRestAttachment()
> **toRestAttachment**(`index`): `RESTAPIAttachment`
Defined in: [structures/AttachmentBuilder.ts:83](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L83)
Produces the attachments[] entry for the JSON payload
#### Parameters
##### index
`number`
#### Returns
`RESTAPIAttachment`
***
### from()
> `static` **from**(`other`): `AttachmentBuilder`
Defined in: [structures/AttachmentBuilder.ts:123](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L123)
Creates a new `AttachmentBuilder` from an existing builder or a plain `AttachmentPayload` object.
#### Parameters
##### other
`AttachmentBuilder` \| [`AttachmentPayload`](/reference/types/AttachmentPayload)
#### Returns
`AttachmentBuilder`
***
### resolve()
> `static` **resolve**(...`builders`): `object`
Defined in: [structures/AttachmentBuilder.ts:112](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/structures/AttachmentBuilder.ts#L112)
Resolves an array of AttachmentBuilders into parallel `files` and
`attachments` arrays ready to spread into your API call options.
#### Parameters
##### builders
...`AttachmentBuilder`[]
#### Returns
`object`
##### attachments
> **attachments**: `RESTAPIAttachment`[]
##### files
> **files**: [`RawFile`](/reference/types/RawFile)[]
#### Example
```ts
const { files, attachments } = AttachmentBuilder.resolve(builder1, builder2);
await interaction.reply({ content: "Here!", files, attachments });
```
# AutocompleteHelper
Defined in: [utils/Autocomplete.ts:23](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Autocomplete.ts#L23)
Represents an autocomplete response for Discord API application commands.
Manages a collection of command option choices and filters them based on user input.
This is because Typescript cannot infer the type of `T` from the constructor argument `value` somehow.
## Example
```typescript
const helper = new AutocompleteHelper('choice', user)
.addChoices(
{ name: 'Choice One', value: 'choice_1' },
{ name: 'Choice Two', value: 'choice_2' }
);
const filteredByName = helper.response(['name']);
const filteredByValue = helper.response(['value']);
const filteredByAll = helper.response();
```
## Type Parameters
### T
`T` *extends* `string` \| `number` = `string` \| `number`
The type of choice values, must be either `string` or `number`.
## Constructors
### Constructor
> **new AutocompleteHelper**<`T`>(`value`, `user?`): `AutocompleteHelper`<`T`>
Defined in: [utils/Autocomplete.ts:32](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Autocomplete.ts#L32)
#### Parameters
##### value
`T`
The current input value from the user to filter against.
##### user?
`APIUser`
The user object, used to provide localized results if available.
#### Returns
`AutocompleteHelper`<`T`>
## Accessors
### choices
#### Get Signature
> **get** **choices**(): `APIApplicationCommandOptionChoice`<`T`>[]
Defined in: [utils/Autocomplete.ts:38](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Autocomplete.ts#L38)
The current array of choices stored in the helper.
##### Returns
`APIApplicationCommandOptionChoice`<`T`>[]
## Methods
### addChoices()
> **addChoices**(...`choices`): `AutocompleteHelper`<`T`>
Defined in: [utils/Autocomplete.ts:43](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Autocomplete.ts#L43)
Adds one or more choices to the existing list.
#### Parameters
##### choices
...`APIApplicationCommandOptionChoice`<`T`>[]
#### Returns
`AutocompleteHelper`<`T`>
***
### clear()
> **clear**(): `AutocompleteHelper`<`T`>
Defined in: [utils/Autocomplete.ts:55](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Autocomplete.ts#L55)
Removes all choices from the helper.
#### Returns
`AutocompleteHelper`<`T`>
***
### response()
> **response**(`filterFields?`): `APIApplicationCommandOptionChoice`<`T`>[]
Defined in: [utils/Autocomplete.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Autocomplete.ts#L97)
Filters choices based on the value provided in the constructor.
#### Parameters
##### filterFields?
(keyof `APIApplicationCommandOptionChoice`<`T`>)[] = `[]`
An array of fields to filter by. Defaults to an empty array.
#### Returns
`APIApplicationCommandOptionChoice`<`T`>[]
An array of filtered choices.
If `filterFields` is omitted, it will be filtered by all fields.
***
### setChoices()
> **setChoices**(...`choices`): `AutocompleteHelper`<`T`>
Defined in: [utils/Autocomplete.ts:49](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Autocomplete.ts#L49)
Overwrites the current list of choices with a new set.
#### Parameters
##### choices
...`APIApplicationCommandOptionChoice`<`T`>[]
#### Returns
`AutocompleteHelper`<`T`>
# BaseInteraction
Defined in: [interactions/BaseInteraction.ts:83](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L83)
Base class for all typed Discord interactions. Wraps the raw interaction payload with
response helpers (`reply`, `editReply`, `followUp`, ...), type guards (`isButton`, `isModal`, ...),
and convenience getters mirroring the raw payload's fields.
Not instantiated directly — use one of the concrete subclasses (`ChatInputCommandInteraction`,
`ButtonInteraction`, `ModalInteraction`, etc.), which `Honocord` constructs and passes to handlers.
## Extended by
- [`ModalInteraction`](/reference/classes/ModalInteraction)
- [`AutocompleteInteraction`](/reference/types/AutocompleteInteraction)
## Type Parameters
### Type
`Type` *extends* `InteractionType`
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new BaseInteraction**<`Type`, `Context`>(`api`, `data`, `context`): `BaseInteraction`<`Type`, `Context`>
Defined in: [interactions/BaseInteraction.ts:101](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L101)
#### Parameters
##### api
`API`
##### data
`Extract`<`APIApplicationCommandAutocompleteInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIChatInputApplicationCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIMessageApplicationCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIUserApplicationCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIPrimaryEntryPointCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIMessageComponentInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIModalSubmitInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}>
##### context
`Context`
#### Returns
`BaseInteraction`<`Type`, `Context`>
## Properties
### \_ephemeral
> `protected` **\_ephemeral**: `boolean` \| `null` = `null`
Defined in: [interactions/BaseInteraction.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L93)
***
### api
> `protected` **api**: `API`
Defined in: [interactions/BaseInteraction.ts:102](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L102)
***
### context
> `readonly` **context**: `Context`
Defined in: [interactions/BaseInteraction.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L97)
The Hono interaction context this interaction was created from.
***
### deferred
> `protected` **deferred**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:95](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L95)
***
### fetcher
> `readonly` **fetcher**: [`Fetcher`](/reference/classes/Fetcher)
Defined in: [interactions/BaseInteraction.ts:99](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L99)
Cache-aware fetcher for resolving Discord entities referenced by this interaction.
***
### raw
> `protected` `readonly` **raw**: `Extract`<`APIApplicationCommandAutocompleteInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIChatInputApplicationCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIMessageApplicationCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIUserApplicationCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIPrimaryEntryPointCommandInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIMessageComponentInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}> \| `Extract`<`APIModalSubmitInteraction`, {String.fromCharCode(123)} `type`: `Type`; {String.fromCharCode(125)}>
Defined in: [interactions/BaseInteraction.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L90)
The raw interaction data
***
### replied
> `protected` **replied**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L94)
***
### rest
> `readonly` **rest**: `REST`
Defined in: [interactions/BaseInteraction.ts:92](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L92)
REST client used to make requests to the Discord API.
***
### type
> `readonly` **type**: `Type`
Defined in: [interactions/BaseInteraction.ts:88](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L88)
The interaction's Discord interaction type.
## Accessors
### applicationId
#### Get Signature
> **get** **applicationId**(): `string`
Defined in: [interactions/BaseInteraction.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L114)
The ID of the application this interaction was sent to.
##### Returns
`string`
***
### appPermissions
#### Get Signature
> **get** **appPermissions**(): `string`
Defined in: [interactions/BaseInteraction.ts:179](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L179)
Bitwise set of permissions the app has in the source location of the interaction.
##### Returns
`string`
***
### channel
#### Get Signature
> **get** **channel**(): `Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L129)
The partial channel object the interaction was sent from, if any. Not cached — see [Honocord](/reference/classes/Honocord)'s runtime notes.
##### Returns
`Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
***
### channelId
#### Get Signature
> **get** **channelId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:124](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L124)
The ID of the channel the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
***
### entitlements
#### Get Signature
> **get** **entitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:119](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L119)
Entitlements for the invoking user, for monetized apps.
##### Returns
`APIEntitlement`[]
***
### guild
#### Get Signature
> **get** **guild**(): `APIPartialInteractionGuild` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:139](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L139)
The partial guild object the interaction was sent from, if any. Not cached.
##### Returns
`APIPartialInteractionGuild` \| `undefined`
***
### guildId
#### Get Signature
> **get** **guildId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:134](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L134)
The ID of the guild the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
***
### guildLocale
#### Get Signature
> **get** **guildLocale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:164](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L164)
The guild's locale, if sent from a guild.
##### Returns
`Locale` \| `undefined`
***
### id
#### Get Signature
> **get** **id**(): `string`
Defined in: [interactions/BaseInteraction.ts:174](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L174)
The interaction's ID.
##### Returns
`string`
***
### locale
#### Get Signature
> **get** **locale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:159](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L159)
The invoking user's locale.
##### Returns
`Locale` \| `undefined`
***
### member
#### Get Signature
> **get** **member**(): `APIInteractionGuildMember` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:154](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L154)
The guild member who triggered the interaction, if sent from a guild.
##### Returns
`APIInteractionGuildMember` \| `undefined`
***
### token
#### Get Signature
> **get** **token**(): `string`
Defined in: [interactions/BaseInteraction.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L169)
The interaction token, used to send/edit/delete responses.
##### Returns
`string`
***
### user
#### Get Signature
> **get** **user**(): `APIUser`
Defined in: [interactions/BaseInteraction.ts:149](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L149)
The user who triggered the interaction (resolved from `member.user` in guilds, `user` in DMs).
##### Returns
`APIUser`
***
### userId
#### Get Signature
> **get** **userId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L144)
The ID of the user who triggered the interaction.
##### Returns
`string` \| `undefined`
***
### version
#### Get Signature
> **get** **version**(): `1`
Defined in: [interactions/BaseInteraction.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L184)
Discord's interaction payload version (always `1`).
##### Returns
`1`
## Methods
### deferReply()
> **deferReply**(`forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L296)
Acknowledges the interaction without sending an initial response, showing a "thinking" state.
Use `editReply` afterwards to send the actual response, within the 15-minute interaction token lifetime.
#### Parameters
##### forceEphemeral?
`boolean` = `true`
Whether the eventual response should be ephemeral. Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
***
### deferUpdate()
> **deferUpdate**(): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:321](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L321)
Defers the update of a component interaction.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
A promise that resolves when the update is deferred
Responding to a component interaction via the deferUpdate() method acknowledges the interaction and resets the message state.
This method can be used to suppress the need for further responses, however it's encouraged to provide meaningful feedback to users via an update() or ephemeral reply() at least.\
Once deferUpdate() has been called, future messages can be sent by calling followUp() or edits can be made by calling editReply() on the component interaction.
Example flow:
1. User clicks a button.
2. Bot calls `deferUpdate()` to acknowledge the interaction.
3. Bot performs some processing.
4. Bot calls `editReply()` to update the original message.
***
### deleteReply()
> **deleteReply**(`messageId?`): `Promise`<`void`>
Defined in: [interactions/BaseInteraction.ts:359](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L359)
Deletes the original interaction response (or a follow-up message).
#### Parameters
##### messageId?
`string`
The message id to delete, defaults to `@original`
#### Returns
`Promise`<`void`>
A promise that resolves when the message is deleted
This is used to delete the original interaction response message or a follow-up message.
***
### editReply()
> **editReply**(`options`, `messageId?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:336](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L336)
Edits the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to edit the message with
##### messageId?
`string` = `"@original"`
The message id to edit, defaults to `@original`
#### Returns
`Promise`<`APIMessage`>
The edited message
This is used to edit the original interaction response message.
Before using this method, the interaction needs to be replied to first before using this method - with `reply`, `deferReply` or `update`.
***
### followUp()
> **followUp**(`options`, `forceEphemeral?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:397](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L397)
Sends a follow-up message to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to send the follow-up message with
##### forceEphemeral?
`boolean` = `false`
Whether to force the message to be ephemeral
#### Returns
`Promise`<`APIMessage`>
The sent follow-up message
This is used to send additional messages after the initial interaction response.
***
### getAppEntitlements()
> **getAppEntitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:207](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L207)
Returns entitlements belonging to this interaction's application.
#### Returns
`APIEntitlement`[]
***
### guildHavePremium()
> **guildHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:212](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L212)
Whether the guild this interaction was sent from currently has an active, non-expired entitlement.
#### Returns
`boolean`
***
### inDM()
> **inDM**(): `this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
Defined in: [interactions/BaseInteraction.ts:202](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L202)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to `undefined` when the interaction was sent from a DM.
#### Returns
`this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
***
### inGuild()
> **inGuild**(): `this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
Defined in: [interactions/BaseInteraction.ts:197](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L197)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to defined when the interaction was sent from a guild.
#### Returns
`this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
***
### isAutocomplete()
> **isAutocomplete**(): `this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
Defined in: [interactions/BaseInteraction.ts:490](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L490)
Type guard: whether this is an autocomplete request for a slash command option.
#### Returns
`this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
***
### isButton()
> **isButton**(): `this is ButtonInteraction`
Defined in: [interactions/BaseInteraction.ts:460](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L460)
Type guard: whether this is a button click interaction.
#### Returns
`this is ButtonInteraction`
***
### isChannelSelect()
> **isChannelSelect**(): `this is ChannelSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:485](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L485)
Type guard: whether this is a channel select menu interaction.
#### Returns
`this is ChannelSelectInteraction`
***
### isChatInputCommand()
> **isChatInputCommand**(): `this is ChatInputCommandInteraction`
Defined in: [interactions/BaseInteraction.ts:421](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L421)
Type guard: whether this is a chat input (slash) command interaction.
#### Returns
`this is ChatInputCommandInteraction`
***
### isCommand()
> **isCommand**(): `this is CommandInteraction`
Defined in: [interactions/BaseInteraction.ts:416](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L416)
Type guard: whether this is an application command interaction (slash command or context menu command).
#### Returns
`this is CommandInteraction`
***
### isJSONEncodable()
> `protected` **isJSONEncodable**(`obj`): `obj is JSONEncodable`
Defined in: [interactions/BaseInteraction.ts:188](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L188)
#### Parameters
##### obj
`unknown`
#### Returns
`obj is JSONEncodable`
***
### isMentionableSelect()
> **isMentionableSelect**(): `this is MentionableSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:480](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L480)
Type guard: whether this is a mentionable (user + role) select menu interaction.
#### Returns
`this is MentionableSelectInteraction`
***
### isMessageComponent()
> **isMessageComponent**(): `this is MessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:455](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L455)
Type guard: whether this is a message component interaction (button or select menu).
#### Returns
`this is MessageComponentInteraction`
***
### isMessageContextCommand()
> **isMessageContextCommand**(): `this is MessageContextInteraction`
Defined in: [interactions/BaseInteraction.ts:437](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L437)
Type guard: whether this is a message context menu command interaction.
#### Returns
`this is MessageContextInteraction`
***
### isMessageModal()
> **isMessageModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:450](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L450)
Type guard: whether this is a modal submit interaction that opened from a message (not a slash command).
#### Returns
`this is ModalInteraction`
***
### isModal()
> **isModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:445](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L445)
Type guard: whether this is a modal submit interaction.
#### Returns
`this is ModalInteraction`
***
### isRoleSelect()
> **isRoleSelect**(): `this is RoleSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:475](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L475)
Type guard: whether this is a role select menu interaction.
#### Returns
`this is RoleSelectInteraction`
***
### isStringSelect()
> **isStringSelect**(): `this is StringSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:465](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L465)
Type guard: whether this is a string select menu interaction.
#### Returns
`this is StringSelectInteraction`
***
### isUserContextCommand()
> **isUserContextCommand**(): `this is UserContextInteraction`
Defined in: [interactions/BaseInteraction.ts:429](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L429)
Type guard: whether this is a user context menu command interaction.
#### Returns
`this is UserContextInteraction`
***
### isUserSelect()
> **isUserSelect**(): `this is UserSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:470](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L470)
Type guard: whether this is a user select menu interaction.
#### Returns
`this is UserSelectInteraction`
***
### reply()
> **reply**(`options`, `forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:273](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L273)
Sends the initial response to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The message content, or a string shorthand for `{ content: options }`
##### forceEphemeral?
`boolean` = `true`
Whether to force the response to be ephemeral (visible only to the invoking user). Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The created interaction response, including the created message.
***
### toSnakeCase()
> `protected` **toSnakeCase**<`T`>(`obj`): `T`
Defined in: [interactions/BaseInteraction.ts:192](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L192)
#### Type Parameters
##### T
`T` = `unknown`
#### Parameters
##### obj
`unknown`
#### Returns
`T`
***
### update()
> **update**(`options`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:374](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L374)
Updates the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to update the message with
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The updated message
This is mainly used for component interactions where you want to update the message the component is attached to OR for
moodal submit interactions to update the message that opened the modal.
After calling this method, the interaction is considered replied and you need to use `editReply` to edit the original response.
***
### userHavePremium()
> **userHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:222](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L222)
Whether the user who triggered this interaction currently has an active, non-expired entitlement.
#### Returns
`boolean`
# CacheManager
Defined in: [utils/CacheManager.ts:31](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L31)
Provides a structured, namespace-aware layer on top of a `BaseCacheAdapter`. Set on the Hono
context by `Honocord` after calling `withCache()` and accessible in middleware and handlers as
`c.var.cache`, or via `interaction.fetcher`.
## Example
```ts
const cache = c.var.cache; // CacheManager | null
```
## Constructors
### Constructor
> **new CacheManager**(`adapter`, `defaultTtlMs?`): `CacheManager`
Defined in: [utils/CacheManager.ts:50](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L50)
#### Parameters
##### adapter
`BaseCacheAdapter`
The cache backend to use
##### defaultTtlMs?
`number` = `...`
Fallback TTL in milliseconds for all `set`/`mset` calls that don't supply their own TTL. Defaults to 5 minutes.
#### Returns
`CacheManager`
## Properties
### channels
> `readonly` **channels**: [`NamespaceAccessor`](/reference/types/NamespaceAccessor)<[`CachedChannel`](/reference/types/CachedChannel)>
Defined in: [utils/CacheManager.ts:36](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L36)
Cached channel objects. Note: channels resolved from raw interaction payloads are **not**
populated here automatically — Discord only provides partial objects (`id` + `type`) in those cases.
***
### guilds
> `readonly` **guilds**: [`NamespaceAccessor`](/reference/types/NamespaceAccessor)<`APIGuild`>
Defined in: [utils/CacheManager.ts:42](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L42)
Cached guild objects. **Not** populated automatically — the guild object on interactions is partial and only carries `id`, `features`, and `locale`.
***
### members
> `readonly` **members**: [`MemberNamespaceAccessor`](/reference/types/MemberNamespaceAccessor)
Defined in: [utils/CacheManager.ts:44](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L44)
Cached guild member objects, scoped by `guildId`. Members resolved from interaction data are populated automatically.
***
### roles
> `readonly` **roles**: [`NamespaceAccessor`](/reference/types/NamespaceAccessor)<`APIRole`>
Defined in: [utils/CacheManager.ts:38](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L38)
Cached role objects. Roles resolved from interaction data are populated automatically.
***
### users
> `readonly` **users**: [`NamespaceAccessor`](/reference/types/NamespaceAccessor)<`APIUser`>
Defined in: [utils/CacheManager.ts:40](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L40)
Cached user objects. Users found in interaction resolved data and `interaction.user`/`interaction.member.user` are populated automatically.
## Methods
### getDMChannel()
> **getDMChannel**(`userId`): `Promise`<[`CachedDMChannel`](/reference/types/CachedDMChannel) \| `undefined`>
Defined in: [utils/CacheManager.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L129)
Fetches a cached DM channel for a user.
Unlike other namespace accessors, DM channels are looked up by user ID rather than channel ID —
use this instead of `channels.get` when you only have the user ID.
#### Parameters
##### userId
`string`
#### Returns
`Promise`<[`CachedDMChannel`](/reference/types/CachedDMChannel) \| `undefined`>
***
### getGuildRoles()
> **getGuildRoles**(`guildId`): `Promise`<`APIRole`[]>
Defined in: [utils/CacheManager.ts:103](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L103)
Returns all cached roles for the given guild.
Reads a stored index of role IDs and resolves each one from the role namespace. Returns an
empty array if none are cached.
#### Parameters
##### guildId
`string`
#### Returns
`Promise`<`APIRole`[]>
***
### populate()
> **populate**(`i`): `Promise`<`void`>
Defined in: [utils/CacheManager.ts:157](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L157)
Extracts and caches users, roles, members, and channels from a raw interaction payload.
Called automatically by `Honocord` before dispatching to handlers when a cache adapter is registered.
#### Parameters
##### i
[`ValidInteraction`](/reference/types/ValidInteraction)
#### Returns
`Promise`<`void`>
***
### setDMChannel()
> **setDMChannel**(`userId`, `channel`, `ttlMs?`): `Promise`<`void`>
Defined in: [utils/CacheManager.ts:148](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L148)
Manually caches a DM channel for a user. Useful if you have a DM channel object from another
source and want to store it in the cache.
DM channels are stored in two places: the `dm-channel` namespace keyed by user ID, and the
`channel` namespace keyed by channel ID. Both must be populated for the cache to function
properly — this method handles both automatically.
#### Parameters
##### userId
`string`
##### channel
[`CachedChannel`](/reference/types/CachedChannel)
##### ttlMs?
`number`
#### Returns
`Promise`<`void`>
***
### setGuildRoles()
> **setGuildRoles**(`guildId`, `roles`): `Promise`<`void`>
Defined in: [utils/CacheManager.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/CacheManager.ts#L114)
Caches all roles for a guild, and stores an index of their IDs so `getGuildRoles` can look
them back up later.
#### Parameters
##### guildId
`string`
##### roles
`APIRole`[]
#### Returns
`Promise`<`void`>
# ChatInputCommandInteraction
Defined in: [interactions/ChatInputInteraction.ts:8](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ChatInputInteraction.ts#L8)
A slash command interaction. Passed to `SlashCommandHandler.execute`.
## Extends
- [`CommandInteraction`](/reference/types/CommandInteraction)<`ApplicationCommandType.ChatInput`, `Context`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new ChatInputCommandInteraction**<`Context`>(`api`, `interaction`, `c`): `ChatInputCommandInteraction`<`Context`>
Defined in: [interactions/ChatInputInteraction.ts:14](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ChatInputInteraction.ts#L14)
#### Parameters
##### api
`API`
##### interaction
`APIChatInputApplicationCommandInteraction`
##### c
`Context`
#### Returns
`ChatInputCommandInteraction`<`Context`>
#### Overrides
`CommandInteraction.constructor`
## Properties
### \_ephemeral
> `protected` **\_ephemeral**: `boolean` \| `null` = `null`
Defined in: [interactions/BaseInteraction.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L93)
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`_ephemeral`](/reference/types/CommandInteraction#_ephemeral)
***
### api
> `protected` **api**: `API`
Defined in: [interactions/BaseInteraction.ts:102](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L102)
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`api`](/reference/types/CommandInteraction#api)
***
### commandType
> `readonly` **commandType**: `ChatInput`
Defined in: [interactions/CommandInteraction.ts:15](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/CommandInteraction.ts#L15)
The application command type (chat input, user, or message).
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`commandType`](/reference/types/CommandInteraction#commandtype)
***
### context
> `readonly` **context**: `Context`
Defined in: [interactions/BaseInteraction.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L97)
The Hono interaction context this interaction was created from.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`context`](/reference/types/CommandInteraction#context-1)
***
### deferred
> `protected` **deferred**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:95](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L95)
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`deferred`](/reference/types/CommandInteraction#deferred)
***
### fetcher
> `readonly` **fetcher**: [`Fetcher`](/reference/classes/Fetcher)
Defined in: [interactions/BaseInteraction.ts:99](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L99)
Cache-aware fetcher for resolving Discord entities referenced by this interaction.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`fetcher`](/reference/types/CommandInteraction#fetcher)
***
### options
> `readonly` **options**: [`CommandInteractionOptionResolver`](/reference/classes/CommandInteractionOptionResolver)
Defined in: [interactions/ChatInputInteraction.ts:13](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ChatInputInteraction.ts#L13)
Resolver for reading the command's option values.
***
### raw
> `protected` `readonly` **raw**: `APIChatInputApplicationCommandInteraction` \| `APIMessageApplicationCommandInteraction` \| `APIUserApplicationCommandInteraction` \| `APIPrimaryEntryPointCommandInteraction`
Defined in: [interactions/BaseInteraction.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L90)
The raw interaction data
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`raw`](/reference/types/CommandInteraction#raw)
***
### replied
> `protected` **replied**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L94)
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`replied`](/reference/types/CommandInteraction#replied)
***
### rest
> `readonly` **rest**: `REST`
Defined in: [interactions/BaseInteraction.ts:92](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L92)
REST client used to make requests to the Discord API.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`rest`](/reference/types/CommandInteraction#rest)
***
### type
> `readonly` **type**: `ApplicationCommand`
Defined in: [interactions/BaseInteraction.ts:88](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L88)
The interaction's Discord interaction type.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`type`](/reference/types/CommandInteraction#type)
## Accessors
### applicationId
#### Get Signature
> **get** **applicationId**(): `string`
Defined in: [interactions/BaseInteraction.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L114)
The ID of the application this interaction was sent to.
##### Returns
`string`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`applicationId`](/reference/types/CommandInteraction#applicationid)
***
### appPermissions
#### Get Signature
> **get** **appPermissions**(): `string`
Defined in: [interactions/BaseInteraction.ts:179](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L179)
Bitwise set of permissions the app has in the source location of the interaction.
##### Returns
`string`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`appPermissions`](/reference/types/CommandInteraction#apppermissions)
***
### channel
#### Get Signature
> **get** **channel**(): `Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L129)
The partial channel object the interaction was sent from, if any. Not cached — see [Honocord](/reference/classes/Honocord)'s runtime notes.
##### Returns
`Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`channel`](/reference/types/CommandInteraction#channel)
***
### channelId
#### Get Signature
> **get** **channelId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:124](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L124)
The ID of the channel the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`channelId`](/reference/types/CommandInteraction#channelid)
***
### commandId
#### Get Signature
> **get** **commandId**(): `string`
Defined in: [interactions/CommandInteraction.ts:28](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/CommandInteraction.ts#L28)
The invoked command's ID.
##### Returns
`string`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`commandId`](/reference/types/CommandInteraction#commandid)
***
### commandName
#### Get Signature
> **get** **commandName**(): `string`
Defined in: [interactions/CommandInteraction.ts:23](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/CommandInteraction.ts#L23)
The invoked command's name.
##### Returns
`string`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`commandName`](/reference/types/CommandInteraction#commandname)
***
### entitlements
#### Get Signature
> **get** **entitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:119](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L119)
Entitlements for the invoking user, for monetized apps.
##### Returns
`APIEntitlement`[]
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`entitlements`](/reference/types/CommandInteraction#entitlements)
***
### guild
#### Get Signature
> **get** **guild**(): `APIPartialInteractionGuild` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:139](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L139)
The partial guild object the interaction was sent from, if any. Not cached.
##### Returns
`APIPartialInteractionGuild` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`guild`](/reference/types/CommandInteraction#guild)
***
### guildId
#### Get Signature
> **get** **guildId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:134](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L134)
The ID of the guild the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`guildId`](/reference/types/CommandInteraction#guildid)
***
### guildLocale
#### Get Signature
> **get** **guildLocale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:164](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L164)
The guild's locale, if sent from a guild.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`guildLocale`](/reference/types/CommandInteraction#guildlocale)
***
### id
#### Get Signature
> **get** **id**(): `string`
Defined in: [interactions/BaseInteraction.ts:174](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L174)
The interaction's ID.
##### Returns
`string`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`id`](/reference/types/CommandInteraction#id)
***
### locale
#### Get Signature
> **get** **locale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:159](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L159)
The invoking user's locale.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`locale`](/reference/types/CommandInteraction#locale)
***
### member
#### Get Signature
> **get** **member**(): `APIInteractionGuildMember` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:154](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L154)
The guild member who triggered the interaction, if sent from a guild.
##### Returns
`APIInteractionGuildMember` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`member`](/reference/types/CommandInteraction#member)
***
### token
#### Get Signature
> **get** **token**(): `string`
Defined in: [interactions/BaseInteraction.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L169)
The interaction token, used to send/edit/delete responses.
##### Returns
`string`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`token`](/reference/types/CommandInteraction#token)
***
### user
#### Get Signature
> **get** **user**(): `APIUser`
Defined in: [interactions/BaseInteraction.ts:149](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L149)
The user who triggered the interaction (resolved from `member.user` in guilds, `user` in DMs).
##### Returns
`APIUser`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`user`](/reference/types/CommandInteraction#user)
***
### userId
#### Get Signature
> **get** **userId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L144)
The ID of the user who triggered the interaction.
##### Returns
`string` \| `undefined`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`userId`](/reference/types/CommandInteraction#userid)
***
### version
#### Get Signature
> **get** **version**(): `1`
Defined in: [interactions/BaseInteraction.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L184)
Discord's interaction payload version (always `1`).
##### Returns
`1`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`version`](/reference/types/CommandInteraction#version)
## Methods
### deferReply()
> **deferReply**(`forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L296)
Acknowledges the interaction without sending an initial response, showing a "thinking" state.
Use `editReply` afterwards to send the actual response, within the 15-minute interaction token lifetime.
#### Parameters
##### forceEphemeral?
`boolean` = `true`
Whether the eventual response should be ephemeral. Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`deferReply`](/reference/types/CommandInteraction#deferreply)
***
### deferUpdate()
> **deferUpdate**(): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:321](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L321)
Defers the update of a component interaction.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
A promise that resolves when the update is deferred
Responding to a component interaction via the deferUpdate() method acknowledges the interaction and resets the message state.
This method can be used to suppress the need for further responses, however it's encouraged to provide meaningful feedback to users via an update() or ephemeral reply() at least.\
Once deferUpdate() has been called, future messages can be sent by calling followUp() or edits can be made by calling editReply() on the component interaction.
Example flow:
1. User clicks a button.
2. Bot calls `deferUpdate()` to acknowledge the interaction.
3. Bot performs some processing.
4. Bot calls `editReply()` to update the original message.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`deferUpdate`](/reference/types/CommandInteraction#deferupdate)
***
### deleteReply()
> **deleteReply**(`messageId?`): `Promise`<`void`>
Defined in: [interactions/BaseInteraction.ts:359](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L359)
Deletes the original interaction response (or a follow-up message).
#### Parameters
##### messageId?
`string`
The message id to delete, defaults to `@original`
#### Returns
`Promise`<`void`>
A promise that resolves when the message is deleted
This is used to delete the original interaction response message or a follow-up message.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`deleteReply`](/reference/types/CommandInteraction#deletereply)
***
### editReply()
> **editReply**(`options`, `messageId?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:336](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L336)
Edits the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to edit the message with
##### messageId?
`string` = `"@original"`
The message id to edit, defaults to `@original`
#### Returns
`Promise`<`APIMessage`>
The edited message
This is used to edit the original interaction response message.
Before using this method, the interaction needs to be replied to first before using this method - with `reply`, `deferReply` or `update`.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`editReply`](/reference/types/CommandInteraction#editreply)
***
### followUp()
> **followUp**(`options`, `forceEphemeral?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:397](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L397)
Sends a follow-up message to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to send the follow-up message with
##### forceEphemeral?
`boolean` = `false`
Whether to force the message to be ephemeral
#### Returns
`Promise`<`APIMessage`>
The sent follow-up message
This is used to send additional messages after the initial interaction response.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`followUp`](/reference/types/CommandInteraction#followup)
***
### getAppEntitlements()
> **getAppEntitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:207](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L207)
Returns entitlements belonging to this interaction's application.
#### Returns
`APIEntitlement`[]
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`getAppEntitlements`](/reference/types/CommandInteraction#getappentitlements)
***
### guildHavePremium()
> **guildHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:212](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L212)
Whether the guild this interaction was sent from currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`guildHavePremium`](/reference/types/CommandInteraction#guildhavepremium)
***
### inDM()
> **inDM**(): `this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
Defined in: [interactions/BaseInteraction.ts:202](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L202)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to `undefined` when the interaction was sent from a DM.
#### Returns
`this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`inDM`](/reference/types/CommandInteraction#indm)
***
### inGuild()
> **inGuild**(): `this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
Defined in: [interactions/BaseInteraction.ts:197](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L197)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to defined when the interaction was sent from a guild.
#### Returns
`this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`inGuild`](/reference/types/CommandInteraction#inguild)
***
### isAutocomplete()
> **isAutocomplete**(): `this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
Defined in: [interactions/BaseInteraction.ts:490](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L490)
Type guard: whether this is an autocomplete request for a slash command option.
#### Returns
`this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isAutocomplete`](/reference/types/CommandInteraction#isautocomplete)
***
### isButton()
> **isButton**(): `this is ButtonInteraction`
Defined in: [interactions/BaseInteraction.ts:460](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L460)
Type guard: whether this is a button click interaction.
#### Returns
`this is ButtonInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isButton`](/reference/types/CommandInteraction#isbutton)
***
### isChannelSelect()
> **isChannelSelect**(): `this is ChannelSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:485](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L485)
Type guard: whether this is a channel select menu interaction.
#### Returns
`this is ChannelSelectInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isChannelSelect`](/reference/types/CommandInteraction#ischannelselect)
***
### isChatInputCommand()
> **isChatInputCommand**(): `this is ChatInputCommandInteraction`
Defined in: [interactions/BaseInteraction.ts:421](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L421)
Type guard: whether this is a chat input (slash) command interaction.
#### Returns
`this is ChatInputCommandInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isChatInputCommand`](/reference/types/CommandInteraction#ischatinputcommand)
***
### isCommand()
> **isCommand**(): `this is CommandInteraction`
Defined in: [interactions/BaseInteraction.ts:416](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L416)
Type guard: whether this is an application command interaction (slash command or context menu command).
#### Returns
`this is CommandInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isCommand`](/reference/types/CommandInteraction#iscommand)
***
### isJSONEncodable()
> `protected` **isJSONEncodable**(`obj`): `obj is JSONEncodable`
Defined in: [interactions/BaseInteraction.ts:188](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L188)
#### Parameters
##### obj
`unknown`
#### Returns
`obj is JSONEncodable`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isJSONEncodable`](/reference/types/CommandInteraction#isjsonencodable)
***
### isMentionableSelect()
> **isMentionableSelect**(): `this is MentionableSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:480](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L480)
Type guard: whether this is a mentionable (user + role) select menu interaction.
#### Returns
`this is MentionableSelectInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isMentionableSelect`](/reference/types/CommandInteraction#ismentionableselect)
***
### isMessageComponent()
> **isMessageComponent**(): `this is MessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:455](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L455)
Type guard: whether this is a message component interaction (button or select menu).
#### Returns
`this is MessageComponentInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isMessageComponent`](/reference/types/CommandInteraction#ismessagecomponent)
***
### isMessageContextCommand()
> **isMessageContextCommand**(): `this is MessageContextInteraction`
Defined in: [interactions/BaseInteraction.ts:437](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L437)
Type guard: whether this is a message context menu command interaction.
#### Returns
`this is MessageContextInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isMessageContextCommand`](/reference/types/CommandInteraction#ismessagecontextcommand)
***
### isMessageModal()
> **isMessageModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:450](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L450)
Type guard: whether this is a modal submit interaction that opened from a message (not a slash command).
#### Returns
`this is ModalInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isMessageModal`](/reference/types/CommandInteraction#ismessagemodal)
***
### isModal()
> **isModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:445](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L445)
Type guard: whether this is a modal submit interaction.
#### Returns
`this is ModalInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isModal`](/reference/types/CommandInteraction#ismodal)
***
### isOfType()
> **isOfType**<`T`>(`type`): `this is CommandInteraction`
Defined in: [interactions/CommandInteraction.ts:33](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/CommandInteraction.ts#L33)
Type guard narrowing `commandType` to the given application command type.
#### Type Parameters
##### T
`T` *extends* `ApplicationCommandType`
#### Parameters
##### type
`T`
#### Returns
`this is CommandInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isOfType`](/reference/types/CommandInteraction#isoftype)
***
### isRoleSelect()
> **isRoleSelect**(): `this is RoleSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:475](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L475)
Type guard: whether this is a role select menu interaction.
#### Returns
`this is RoleSelectInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isRoleSelect`](/reference/types/CommandInteraction#isroleselect)
***
### isStringSelect()
> **isStringSelect**(): `this is StringSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:465](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L465)
Type guard: whether this is a string select menu interaction.
#### Returns
`this is StringSelectInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isStringSelect`](/reference/types/CommandInteraction#isstringselect)
***
### isUserContextCommand()
> **isUserContextCommand**(): `this is UserContextInteraction`
Defined in: [interactions/BaseInteraction.ts:429](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L429)
Type guard: whether this is a user context menu command interaction.
#### Returns
`this is UserContextInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isUserContextCommand`](/reference/types/CommandInteraction#isusercontextcommand)
***
### isUserSelect()
> **isUserSelect**(): `this is UserSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:470](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L470)
Type guard: whether this is a user select menu interaction.
#### Returns
`this is UserSelectInteraction`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`isUserSelect`](/reference/types/CommandInteraction#isuserselect)
***
### reply()
> **reply**(`options`, `forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:273](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L273)
Sends the initial response to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The message content, or a string shorthand for `{ content: options }`
##### forceEphemeral?
`boolean` = `true`
Whether to force the response to be ephemeral (visible only to the invoking user). Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The created interaction response, including the created message.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`reply`](/reference/types/CommandInteraction#reply)
***
### showModal()
> **showModal**(`data`): `Promise`<`undefined`>
Defined in: [interactions/ModalCapableInteraction.ts:16](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalCapableInteraction.ts#L16)
Responds to the interaction with a modal.
#### Parameters
##### data
[`ModalInteractionResponseCallbackData`](/reference/types/ModalInteractionResponseCallbackData) \| `ModalBuilder`
The modal data to send
#### Returns
`Promise`<`undefined`>
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`showModal`](/reference/types/CommandInteraction#showmodal)
***
### toSnakeCase()
> `protected` **toSnakeCase**<`T`>(`obj`): `T`
Defined in: [interactions/BaseInteraction.ts:192](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L192)
#### Type Parameters
##### T
`T` = `unknown`
#### Parameters
##### obj
`unknown`
#### Returns
`T`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`toSnakeCase`](/reference/types/CommandInteraction#tosnakecase)
***
### update()
> **update**(`options`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:374](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L374)
Updates the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to update the message with
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The updated message
This is mainly used for component interactions where you want to update the message the component is attached to OR for
moodal submit interactions to update the message that opened the modal.
After calling this method, the interaction is considered replied and you need to use `editReply` to edit the original response.
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`update`](/reference/types/CommandInteraction#update)
***
### userHavePremium()
> **userHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:222](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L222)
Whether the user who triggered this interaction currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`CommandInteraction`](/reference/types/CommandInteraction).[`userHavePremium`](/reference/types/CommandInteraction#userhavepremium)
# CommandInteractionOptionResolver
Defined in: [resolvers/CommandOptionResolver.ts:41](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L41)
Resolves typed option values from a slash command or autocomplete interaction, including
subcommand/subcommand-group hoisting and lookups into resolved entity data (users, members,
roles, channels, attachments). Available as `interaction.options` on
`ChatInputCommandInteraction` and `AutocompleteInteraction`.
## Constructors
### Constructor
> **new CommandInteractionOptionResolver**(`options`, `resolved`): `CommandInteractionOptionResolver`
Defined in: [resolvers/CommandOptionResolver.ts:60](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L60)
#### Parameters
##### options
`APIApplicationCommandInteractionDataOption`<`ApplicationCommand` \| `ApplicationCommandAutocomplete`>[] \| `undefined`
##### resolved
`APIInteractionDataResolved` \| `undefined`
#### Returns
`CommandInteractionOptionResolver`
## Accessors
### data
#### Get Signature
> **get** **data**(): `APIApplicationCommandInteractionDataOption`<`ApplicationCommand` \| `ApplicationCommandAutocomplete`>[]
Defined in: [resolvers/CommandOptionResolver.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L97)
##### Returns
`APIApplicationCommandInteractionDataOption`<`ApplicationCommand` \| `ApplicationCommandAutocomplete`>[]
## Methods
### get()
> **get**<`T`>(`name`, `type`, `required?`): `Extract`<`APIApplicationCommandInteractionDataAttachmentOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataBooleanOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataChannelOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataMentionableOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataRoleOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataStringOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataUserOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataIntegerOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataNumberOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataSubcommandGroupOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataSubcommandOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:109](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L109)
Gets an option by its name.
#### Type Parameters
##### T
`T` *extends* `ApplicationCommandOptionType`
#### Parameters
##### name
`string`
The name of the option.
##### type
`T`
The expected type of the option.
##### required?
`boolean` = `false`
Whether to throw an error if the option is not found.
#### Returns
`Extract`<`APIApplicationCommandInteractionDataAttachmentOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataBooleanOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataChannelOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataMentionableOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataRoleOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataStringOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataUserOption`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataIntegerOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataNumberOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataSubcommandGroupOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `Extract`<`APIApplicationCommandInteractionDataSubcommandOption`<`ApplicationCommand`>, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}> \| `null`
The option, if found.
***
### getAttachment()
#### Call Signature
> **getAttachment**(`name`, `required?`): `APIAttachment` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:295](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L295)
Gets an attachment option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`APIAttachment` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getAttachment**(`name`, `required`): `APIAttachment`
Defined in: [resolvers/CommandOptionResolver.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L296)
Gets an attachment option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`APIAttachment`
The value of the option, or null if not set and not required.
***
### getBoolean()
#### Call Signature
> **getBoolean**(`name`, `required?`): `boolean` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L169)
Gets a boolean option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`boolean` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getBoolean**(`name`, `required`): `boolean`
Defined in: [resolvers/CommandOptionResolver.ts:170](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L170)
Gets a boolean option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`boolean`
The value of the option, or null if not set and not required.
***
### getChannel()
#### Call Signature
> **getChannel**(`name`, `required`, `channelTypes`): `APIInteractionDataResolvedChannel` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L184)
Gets a channel option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`false`
Whether to throw an error if the option is not found.
###### channelTypes
`ChannelType`[]
The allowed types of channels. If empty, all channel types are allowed.
##### Returns
`APIInteractionDataResolvedChannel` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getChannel**(`name`, `required`, `channelTypes`): `APIInteractionDataResolvedChannel`
Defined in: [resolvers/CommandOptionResolver.ts:185](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L185)
Gets a channel option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
###### channelTypes
`ChannelType`[]
The allowed types of channels. If empty, all channel types are allowed.
##### Returns
`APIInteractionDataResolvedChannel`
The value of the option, or null if not set and not required.
***
### getFocused()
> **getFocused**(): [`AutocompleteFocusedOption`](/reference/types/AutocompleteFocusedOption) \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:158](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L158)
Gets the currently-focused option during an autocomplete request, or `null` if none is focused.
#### Returns
[`AutocompleteFocusedOption`](/reference/types/AutocompleteFocusedOption) \| `null`
***
### getInteger()
#### Call Signature
> **getInteger**(`name`, `required?`): `number` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:222](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L222)
Gets an integer option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`number` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getInteger**(`name`, `required`): `number`
Defined in: [resolvers/CommandOptionResolver.ts:223](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L223)
Gets an integer option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`number`
The value of the option, or null if not set and not required.
***
### getMember()
#### Call Signature
> **getMember**(`name`, `required?`): [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember) \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:265](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L265)
Gets a member option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
[`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember) \| `null`
The value of the option, or null if the user is not present in the guild or the option is not set.
#### Call Signature
> **getMember**(`name`, `required`): [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)
Defined in: [resolvers/CommandOptionResolver.ts:266](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L266)
Gets a member option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
[`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)
The value of the option, or null if the user is not present in the guild or the option is not set.
***
### getMentionable()
#### Call Signature
> **getMentionable**(`name`, `required?`): `APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember) \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:310](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L310)
Gets a mentionable option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember) \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getMentionable**(`name`, `required`): `APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)
Defined in: [resolvers/CommandOptionResolver.ts:311](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L311)
Gets a mentionable option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)
The value of the option, or null if not set and not required.
***
### getNumber()
#### Call Signature
> **getNumber**(`name`, `required?`): `number` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:236](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L236)
Gets a number option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`number` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getNumber**(`name`, `required`): `number`
Defined in: [resolvers/CommandOptionResolver.ts:237](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L237)
Gets a number option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`number`
The value of the option, or null if not set and not required.
***
### getRole()
#### Call Signature
> **getRole**(`name`, `required?`): `APIRole` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:280](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L280)
Gets a role option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`APIRole` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getRole**(`name`, `required`): `APIRole`
Defined in: [resolvers/CommandOptionResolver.ts:281](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L281)
Gets a role option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`APIRole`
The value of the option, or null if not set and not required.
***
### getString()
#### Call Signature
> **getString**<`T`>(`name`, `required?`): `T` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:208](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L208)
Gets a string option.
##### Type Parameters
###### T
`T` *extends* `string` = `string`
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`T` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getString**<`T`>(`name`, `required`): `T`
Defined in: [resolvers/CommandOptionResolver.ts:209](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L209)
Gets a string option.
##### Type Parameters
###### T
`T` *extends* `string` = `string`
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`T`
The value of the option, or null if not set and not required.
***
### getSubcommand()
#### Call Signature
> **getSubcommand**(): `string` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:131](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L131)
Gets the selected subcommand.
##### Returns
`string` \| `null`
The name of the selected subcommand, or null if not set and not required.
#### Call Signature
> **getSubcommand**(`required`): `string`
Defined in: [resolvers/CommandOptionResolver.ts:132](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L132)
Gets the selected subcommand.
##### Parameters
###### required
`true`
##### Returns
`string`
The name of the selected subcommand, or null if not set and not required.
***
### getSubcommandGroup()
#### Call Signature
> **getSubcommandGroup**(`required?`): `string` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:147](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L147)
Gets the selected subcommand group.
##### Parameters
###### required?
`boolean`
Whether to throw an error if there is no subcommand group.
##### Returns
`string` \| `null`
The name of the selected subcommand group, or null if not set and not required.
#### Call Signature
> **getSubcommandGroup**(`required`): `string`
Defined in: [resolvers/CommandOptionResolver.ts:148](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L148)
Gets the selected subcommand group.
##### Parameters
###### required
`true`
Whether to throw an error if there is no subcommand group.
##### Returns
`string`
The name of the selected subcommand group, or null if not set and not required.
***
### getUser()
#### Call Signature
> **getUser**(`name`, `required?`): `APIUser` \| `null`
Defined in: [resolvers/CommandOptionResolver.ts:250](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L250)
Gets a user option.
##### Parameters
###### name
`string`
The name of the option.
###### required?
`boolean`
Whether to throw an error if the option is not found.
##### Returns
`APIUser` \| `null`
The value of the option, or null if not set and not required.
#### Call Signature
> **getUser**(`name`, `required`): `APIUser`
Defined in: [resolvers/CommandOptionResolver.ts:251](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L251)
Gets a user option.
##### Parameters
###### name
`string`
The name of the option.
###### required
`true`
Whether to throw an error if the option is not found.
##### Returns
`APIUser`
The value of the option, or null if not set and not required.
# ComponentHandler
Defined in: [handlers/ComponentHandler.ts:7](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L7)
Handler for message components (buttons, select menus) based on custom ID prefix
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
### CType
`CType` *extends* [`MessageComponentType`](/reference/types/MessageComponentType) = [`MessageComponentType`](/reference/types/MessageComponentType)
## Constructors
### Constructor
> **new ComponentHandler**<`Context`, `CType`>(`prefix`, `componentType`, `handler?`): `ComponentHandler`<`Context`, `CType`>
Defined in: [handlers/ComponentHandler.ts:21](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L21)
#### Parameters
##### prefix
`string`
The custom ID prefix this handler matches against. See the [Custom ID System](/docs/custom-id-system) guide.
##### componentType
`CType`
The message component type this handler is registered for
##### handler?
(`interaction`) => `any`
Optional handler function, equivalent to calling `addHandler` afterwards
#### Returns
`ComponentHandler`<`Context`, `CType`>
## Properties
### componentType
> `readonly` **componentType**: `CType`
Defined in: [handlers/ComponentHandler.ts:13](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L13)
***
### handlerType
> `readonly` **handlerType**: `"component"` = `"component"`
Defined in: [handlers/ComponentHandler.ts:11](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L11)
***
### prefix
> `readonly` **prefix**: `string`
Defined in: [handlers/ComponentHandler.ts:12](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L12)
## Methods
### addHandler()
> **addHandler**(`handler`): `ComponentHandler`<`Context`, `CType`>
Defined in: [handlers/ComponentHandler.ts:41](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L41)
Adds the component handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the component interaction
#### Returns
`ComponentHandler`<`Context`, `CType`>
The current ComponentHandler instance
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/ComponentHandler.ts:51](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L51)
Executes the component handler
#### Parameters
##### interaction
[`MessageComponentInteractionObj`](/reference/types/MessageComponentInteractionObj)<`Context`, `CType`>
#### Returns
`Promise`<`void`>
***
### matches()
> **matches**(`customId`): `boolean`
Defined in: [handlers/ComponentHandler.ts:61](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ComponentHandler.ts#L61)
Checks if this handler matches the given custom ID
#### Parameters
##### customId
`string`
#### Returns
`boolean`
# ContextCommandHandler
Defined in: [handlers/ContextCommandHandler.ts:13](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L13)
Handler for user and message context menu commands.
## Extends
- `ContextMenuCommandBuilder`
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
Interaction context type
### T
`T` *extends* [`ContextCommandType`](/reference/types/ContextCommandType) = [`ContextCommandType`](/reference/types/ContextCommandType)
Which context command type this handler serves (`User` or `Message`)
### InteractionData
`InteractionData` = `T` *extends* [`User`](/reference/types/ContextCommandType#user) ? [`UserContextInteraction`](/reference/types/UserContextInteraction)<`Context`> : [`MessageContextInteraction`](/reference/types/MessageContextInteraction)<`Context`>
The interaction type passed to the handler function, inferred from `T`
## Constructors
### Constructor
> **new ContextCommandHandler**<`Context`, `T`, `InteractionData`>(`commandType`): `ContextCommandHandler`<`Context`, `T`, `InteractionData`>
Defined in: [handlers/ContextCommandHandler.ts:18](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L18)
#### Parameters
##### commandType
`T`
#### Returns
`ContextCommandHandler`<`Context`, `T`, `InteractionData`>
#### Overrides
`ContextMenuCommandBuilder.constructor`
## Properties
### commandType
> `readonly` **commandType**: `T`
Defined in: [handlers/ContextCommandHandler.ts:18](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L18)
***
### guildIds
> `readonly` **guildIds**: `Set`<`string`>
Defined in: [handlers/ContextCommandHandler.ts:28](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L28)
Set of guild IDs where this command is registered (empty for global commands)
***
### handlerType
> `readonly` **handlerType**: `"context"` = `"context"`
Defined in: [handlers/ContextCommandHandler.ts:23](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L23)
## Methods
### addGuildIds()
> **addGuildIds**(...`guildIds`): `this`
Defined in: [handlers/ContextCommandHandler.ts:45](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L45)
Adds one or more guild IDs to `guildIds`, making this a guild-scoped command.
#### Parameters
##### guildIds
...`string`[]
#### Returns
`this`
***
### addHandler()
> **addHandler**(`handler`): `ContextCommandHandler`<`Context`, `T`, `InteractionData`>
Defined in: [handlers/ContextCommandHandler.ts:66](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L66)
Adds the command handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the context command interaction
#### Returns
`ContextCommandHandler`<`Context`, `T`, `InteractionData`>
The current ContextCommandHandler instance
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/ContextCommandHandler.ts:76](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L76)
Executes the command handler
#### Parameters
##### interaction
`InteractionData`
#### Returns
`Promise`<`void`>
***
### isGuildCommand()
> **isGuildCommand**(): `boolean`
Defined in: [handlers/ContextCommandHandler.ts:31](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L31)
Whether this command is registered per-guild (`true`) or globally (`false`, the default).
#### Returns
`boolean`
***
### removeGuildIds()
> **removeGuildIds**(...`guildIds`): `this`
Defined in: [handlers/ContextCommandHandler.ts:53](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L53)
Removes one or more guild IDs from `guildIds`.
#### Parameters
##### guildIds
...`string`[]
#### Returns
`this`
***
### setGuildIds()
> **setGuildIds**(`guildIds`): `this`
Defined in: [handlers/ContextCommandHandler.ts:36](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ContextCommandHandler.ts#L36)
Replaces `guildIds` with the given list, making this a guild-scoped command.
#### Parameters
##### guildIds
`string`[]
#### Returns
`this`
# DynamicGlobalContextCommandHandler
Defined in: [handlers/DynamicContextCommandHandler.ts:57](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L57)
Fallback handler for global user/message context commands whose name isn't known ahead of
time, or that don't match any registered `ContextCommandHandler`. Also catches unmatched
guild-scoped invocations when no [DynamicGuildContextCommandHandler](/reference/classes/DynamicGuildContextCommandHandler) is registered.
Only one instance may be registered per `Honocord` instance via `loadHandlers`.
## Extends
- `DynamicContextCommandHandlerBase`<`Context`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new DynamicGlobalContextCommandHandler**<`Context`>(): `DynamicGlobalContextCommandHandler`<`Context`>
#### Returns
`DynamicGlobalContextCommandHandler`<`Context`>
#### Inherited from
`DynamicContextCommandHandlerBase.constructor`
## Properties
### handlerType
> `readonly` **handlerType**: `"dynamic-context"` = `"dynamic-context"`
Defined in: [handlers/DynamicContextCommandHandler.ts:11](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L11)
#### Inherited from
`DynamicContextCommandHandlerBase.handlerType`
***
### scope
> `readonly` **scope**: `"global"`
Defined in: [handlers/DynamicContextCommandHandler.ts:60](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L60)
#### Overrides
`DynamicContextCommandHandlerBase.scope`
## Methods
### addHandler()
> **addHandler**(`handler`): `this`
Defined in: [handlers/DynamicContextCommandHandler.ts:20](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L20)
Adds the command handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the context command interaction. Receives both
User and Message context interactions — narrow with `interaction.isOfType(...)`.
#### Returns
`this`
#### Inherited from
`DynamicContextCommandHandlerBase.addHandler`
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/DynamicContextCommandHandler.ts:28](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L28)
Executes the command handler
#### Parameters
##### interaction
[`DynamicContextInteraction`](/reference/types/DynamicContextInteraction)<`Context`>
#### Returns
`Promise`<`void`>
#### Inherited from
`DynamicContextCommandHandlerBase.execute`
# DynamicGlobalSlashCommandHandler
Defined in: [handlers/DynamicSlashCommandHandler.ts:72](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L72)
Fallback handler for global slash commands whose name isn't known ahead of time, or that
don't match any registered `SlashCommandHandler`. Also catches unmatched guild-scoped
invocations when no [DynamicGuildSlashCommandHandler](/reference/classes/DynamicGuildSlashCommandHandler) is registered.
Only one instance may be registered per `Honocord` instance via `loadHandlers`.
## Extends
- `DynamicSlashCommandHandlerBase`<`Context`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new DynamicGlobalSlashCommandHandler**<`Context`>(): `DynamicGlobalSlashCommandHandler`<`Context`>
#### Returns
`DynamicGlobalSlashCommandHandler`<`Context`>
#### Inherited from
`DynamicSlashCommandHandlerBase.constructor`
## Properties
### handlerType
> `readonly` **handlerType**: `"dynamic-slash"` = `"dynamic-slash"`
Defined in: [handlers/DynamicSlashCommandHandler.ts:7](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L7)
#### Inherited from
`DynamicSlashCommandHandlerBase.handlerType`
***
### scope
> `readonly` **scope**: `"global"`
Defined in: [handlers/DynamicSlashCommandHandler.ts:75](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L75)
#### Overrides
`DynamicSlashCommandHandlerBase.scope`
## Methods
### addAutocompleteHandler()
> **addAutocompleteHandler**(`handler`): `this`
Defined in: [handlers/DynamicSlashCommandHandler.ts:26](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L26)
Adds the autocomplete handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the autocomplete interaction
#### Returns
`this`
#### Inherited from
`DynamicSlashCommandHandlerBase.addAutocompleteHandler`
***
### addHandler()
> **addHandler**(`handler`): `this`
Defined in: [handlers/DynamicSlashCommandHandler.ts:16](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L16)
Adds the command handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the command interaction
#### Returns
`this`
#### Inherited from
`DynamicSlashCommandHandlerBase.addHandler`
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/DynamicSlashCommandHandler.ts:34](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L34)
Executes the command handler
#### Parameters
##### interaction
[`ChatInputCommandInteraction`](/reference/classes/ChatInputCommandInteraction)<`Context`>
#### Returns
`Promise`<`void`>
#### Inherited from
`DynamicSlashCommandHandlerBase.execute`
***
### executeAutocomplete()
> **executeAutocomplete**(`interaction`): `Promise`<`void`>
Defined in: [handlers/DynamicSlashCommandHandler.ts:44](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L44)
Executes the autocomplete handler if it exists
#### Parameters
##### interaction
[`AutocompleteInteraction`](/reference/types/AutocompleteInteraction)<`Context`>
#### Returns
`Promise`<`void`>
#### Inherited from
`DynamicSlashCommandHandlerBase.executeAutocomplete`
# DynamicGuildContextCommandHandler
Defined in: [handlers/DynamicContextCommandHandler.ts:44](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L44)
Fallback handler for guild-scoped user/message context commands whose name isn't known
ahead of time (e.g. per-guild custom commands), or that don't match any registered
`ContextCommandHandler`.
When an invocation has a `guild_id`, this handler is tried before [DynamicGlobalContextCommandHandler](/reference/classes/DynamicGlobalContextCommandHandler).
Only one instance may be registered per `Honocord` instance via `loadHandlers`.
## Extends
- `DynamicContextCommandHandlerBase`<`Context`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new DynamicGuildContextCommandHandler**<`Context`>(): `DynamicGuildContextCommandHandler`<`Context`>
#### Returns
`DynamicGuildContextCommandHandler`<`Context`>
#### Inherited from
`DynamicContextCommandHandlerBase.constructor`
## Properties
### handlerType
> `readonly` **handlerType**: `"dynamic-context"` = `"dynamic-context"`
Defined in: [handlers/DynamicContextCommandHandler.ts:11](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L11)
#### Inherited from
`DynamicContextCommandHandlerBase.handlerType`
***
### scope
> `readonly` **scope**: `"guild"`
Defined in: [handlers/DynamicContextCommandHandler.ts:47](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L47)
#### Overrides
`DynamicContextCommandHandlerBase.scope`
## Methods
### addHandler()
> **addHandler**(`handler`): `this`
Defined in: [handlers/DynamicContextCommandHandler.ts:20](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L20)
Adds the command handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the context command interaction. Receives both
User and Message context interactions — narrow with `interaction.isOfType(...)`.
#### Returns
`this`
#### Inherited from
`DynamicContextCommandHandlerBase.addHandler`
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/DynamicContextCommandHandler.ts:28](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicContextCommandHandler.ts#L28)
Executes the command handler
#### Parameters
##### interaction
[`DynamicContextInteraction`](/reference/types/DynamicContextInteraction)<`Context`>
#### Returns
`Promise`<`void`>
#### Inherited from
`DynamicContextCommandHandlerBase.execute`
# DynamicGuildSlashCommandHandler
Defined in: [handlers/DynamicSlashCommandHandler.ts:59](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L59)
Fallback handler for guild-scoped slash commands whose name isn't known ahead of time
(e.g. per-guild custom commands), or that don't match any registered `SlashCommandHandler`.
When an invocation has a `guild_id`, this handler is tried before [DynamicGlobalSlashCommandHandler](/reference/classes/DynamicGlobalSlashCommandHandler).
Only one instance may be registered per `Honocord` instance via `loadHandlers`.
## Extends
- `DynamicSlashCommandHandlerBase`<`Context`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new DynamicGuildSlashCommandHandler**<`Context`>(): `DynamicGuildSlashCommandHandler`<`Context`>
#### Returns
`DynamicGuildSlashCommandHandler`<`Context`>
#### Inherited from
`DynamicSlashCommandHandlerBase.constructor`
## Properties
### handlerType
> `readonly` **handlerType**: `"dynamic-slash"` = `"dynamic-slash"`
Defined in: [handlers/DynamicSlashCommandHandler.ts:7](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L7)
#### Inherited from
`DynamicSlashCommandHandlerBase.handlerType`
***
### scope
> `readonly` **scope**: `"guild"`
Defined in: [handlers/DynamicSlashCommandHandler.ts:62](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L62)
#### Overrides
`DynamicSlashCommandHandlerBase.scope`
## Methods
### addAutocompleteHandler()
> **addAutocompleteHandler**(`handler`): `this`
Defined in: [handlers/DynamicSlashCommandHandler.ts:26](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L26)
Adds the autocomplete handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the autocomplete interaction
#### Returns
`this`
#### Inherited from
`DynamicSlashCommandHandlerBase.addAutocompleteHandler`
***
### addHandler()
> **addHandler**(`handler`): `this`
Defined in: [handlers/DynamicSlashCommandHandler.ts:16](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L16)
Adds the command handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the command interaction
#### Returns
`this`
#### Inherited from
`DynamicSlashCommandHandlerBase.addHandler`
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/DynamicSlashCommandHandler.ts:34](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L34)
Executes the command handler
#### Parameters
##### interaction
[`ChatInputCommandInteraction`](/reference/classes/ChatInputCommandInteraction)<`Context`>
#### Returns
`Promise`<`void`>
#### Inherited from
`DynamicSlashCommandHandlerBase.execute`
***
### executeAutocomplete()
> **executeAutocomplete**(`interaction`): `Promise`<`void`>
Defined in: [handlers/DynamicSlashCommandHandler.ts:44](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/DynamicSlashCommandHandler.ts#L44)
Executes the autocomplete handler if it exists
#### Parameters
##### interaction
[`AutocompleteInteraction`](/reference/types/AutocompleteInteraction)<`Context`>
#### Returns
`Promise`<`void`>
#### Inherited from
`DynamicSlashCommandHandlerBase.executeAutocomplete`
# Fetcher
Defined in: [utils/Fetcher.ts:18](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L18)
Cache-first REST wrapper available on every interaction object as `interaction.fetcher`. Checks
the `CacheManager` before making a live Discord API request, and writes the result back to the
cache automatically. If no cache adapter is configured, bypasses the cache and always fetches
from the API.
## Example
```ts
// Inside any handler or middleware
const user = await interaction.fetcher.users.get(userId);
```
## Constructors
### Constructor
> **new Fetcher**(`api`, `getCache`): `Fetcher`
Defined in: [utils/Fetcher.ts:20](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L20)
Constructed internally by `BaseInteraction` — you do not construct this directly.
#### Parameters
##### api
`API`
The raw `@discordjs/core` `API` instance. Use this for any Discord REST call not covered by the named accessors.
##### getCache
() => [`CacheManager`](/reference/classes/CacheManager) \| `null` \| `undefined`
#### Returns
`Fetcher`
## Properties
### api
> `readonly` **api**: `API`
Defined in: [utils/Fetcher.ts:22](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L22)
The raw `@discordjs/core` `API` instance. Use this for any Discord REST call not covered by the named accessors.
***
### channels
> `readonly` **channels**: `object`
Defined in: [utils/Fetcher.ts:60](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L60)
Cache-first accessor for channels.
#### get
> **get**: (`channelId`) => `Promise`<[`CachedChannel`](/reference/types/CachedChannel)>
Fetches a channel by ID. Returns the cached value if available, otherwise fetches from Discord and caches the result.
##### Parameters
###### channelId
`string`
##### Returns
`Promise`<[`CachedChannel`](/reference/types/CachedChannel)>
***
### dmChannels
> `readonly` **dmChannels**: `object`
Defined in: [utils/Fetcher.ts:71](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L71)
Cache-first accessor for DM channels.
#### get
> **get**: (`userId`) => `Promise`<[`CachedDMChannel`](/reference/types/CachedDMChannel)>
Fetches a DM channel for a user. Returns the cached value if available, otherwise creates a new DM channel via Discord and caches the result.
##### Parameters
###### userId
`string`
##### Returns
`Promise`<[`CachedDMChannel`](/reference/types/CachedDMChannel)>
***
### guilds
> `readonly` **guilds**: `object`
Defined in: [utils/Fetcher.ts:82](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L82)
Cache-first accessor for guilds.
#### get
> **get**: (`guildId`) => `Promise`<`APIGuild`>
Fetches a guild by ID. Returns the cached value if available, otherwise fetches from Discord and caches the result.
##### Parameters
###### guildId
`string`
##### Returns
`Promise`<`APIGuild`>
***
### members
> `readonly` **members**: `object`
Defined in: [utils/Fetcher.ts:115](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L115)
Cache-first accessor for guild members.
#### get
> **get**: (`guildId`, `userId`) => `Promise`<`APIGuildMember` \| [`CachedGuildMember`](/reference/types/CachedGuildMember)>
Fetches a guild member by user ID. Returns the cached value if available, otherwise fetches from Discord and caches the result.
##### Parameters
###### guildId
`string`
###### userId
`string`
##### Returns
`Promise`<`APIGuildMember` \| [`CachedGuildMember`](/reference/types/CachedGuildMember)>
***
### roles
> `readonly` **roles**: `object`
Defined in: [utils/Fetcher.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L93)
Cache-first accessor for roles.
#### get
> **get**: (`guildId`, `roleId`) => `Promise`<`APIRole`>
Fetches a single role. If not cached, fetches **all** roles for the guild via `guilds.getRoles` and returns the matching one.
##### Parameters
###### guildId
`string`
###### roleId
`string`
##### Returns
`Promise`<`APIRole`>
#### list
> **list**: (`guildId`) => `Promise`<`APIRole`[]>
Fetches **all** roles for a guild. Returns cached roles if available (via `CacheManager.getGuildRoles`), otherwise fetches from Discord and bulk-caches the result.
##### Parameters
###### guildId
`string`
##### Returns
`Promise`<`APIRole`[]>
***
### users
> `readonly` **users**: `object`
Defined in: [utils/Fetcher.ts:49](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Fetcher.ts#L49)
Cache-first accessor for users.
#### get
> **get**: (`userId`) => `Promise`<`APIUser`>
Fetches a user by ID. Returns the cached value if available, otherwise fetches from Discord and caches the result.
##### Parameters
###### userId
`string`
##### Returns
`Promise`<`APIUser`>
# Honocord
Defined in: [Honocord.ts:86](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L86)
## Constructors
### Constructor
> **new Honocord**(`__namedParameters?`): `Honocord`
Defined in: [Honocord.ts:138](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L138)
#### Parameters
##### \_\_namedParameters?
[`HonocordOptions`](/reference/types/HonocordOptions) = `{}`
#### Returns
`Honocord`
## Methods
### clearMiddleware()
> **clearMiddleware**(): `this`
Defined in: [Honocord.ts:769](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L769)
Clears all registered middleware functions.
#### Returns
`this`
The Honocord instance for chaining.
***
### getApp()
> **getApp**(`options?`): `Hono`<{String.fromCharCode(123)} `Variables`: [`BaseVariables`](/reference/types/BaseVariables); {String.fromCharCode(125)}, `BlankSchema`, `"/"`>
Defined in: [Honocord.ts:608](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L608)
Returns a Hono App instance with the interaction handler mounted at the root path and a GET Handler for all paths, which returns a simple Health response.
#### Parameters
##### options?
[`HonocordAppOptions`](/reference/types/HonocordAppOptions) = `{}`
#### Returns
`Hono`<{String.fromCharCode(123)} `Variables`: [`BaseVariables`](/reference/types/BaseVariables); {String.fromCharCode(125)}, `BlankSchema`, `"/"`>
#### Example
```typescript
import { Honocord } from "honocord";
const honoCord = new Honocord();
export default honoCord.getApp();
// Supports both "/" and "/interactions" for the interactions handler, if any are loaded
// And `/webhook` for the webhook handler if any are loaded
```
***
### interactionsHandler()
> **interactionsHandler**(`c`): `Promise`<`Response` & `TypedResponse`<`"Bad request signature."`, `401`, `"text"`> \| `Response` & `TypedResponse`<`"No interaction found."`, `400`, `"text"`> \| `JSONRespondReturn`<{String.fromCharCode(123)} {String.fromCharCode(125)}, `202`> \| `Response` & `TypedResponse`<`"Internal server error."`, `500`, `"text"`> \| `JSONRespondReturn`<{String.fromCharCode(123)} `type`: `InteractionResponseType`; {String.fromCharCode(125)}, `ContentfulStatusCode`> \| `undefined`>
Defined in: [Honocord.ts:551](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L551)
Returns a Hono handler for POST Requests handling Discord interactions.
#### Parameters
##### c
[`BaseInteractionContext`](/reference/types/BaseInteractionContext)
#### Returns
`Promise`<`Response` & `TypedResponse`<`"Bad request signature."`, `401`, `"text"`> \| `Response` & `TypedResponse`<`"No interaction found."`, `400`, `"text"`> \| `JSONRespondReturn`<{String.fromCharCode(123)} {String.fromCharCode(125)}, `202`> \| `Response` & `TypedResponse`<`"Internal server error."`, `500`, `"text"`> \| `JSONRespondReturn`<{String.fromCharCode(123)} `type`: `InteractionResponseType`; {String.fromCharCode(125)}, `ContentfulStatusCode`> \| `undefined`>
#### Example
```typescript
import { Hono } from "hono";
import { Honocord } from "honocord";
const app = new Hono();
const bot = new Honocord();
app.get("/", (c) => c.text("🔥 Honocord is running!"));
app.post("/interactions", bot.interactionsHandler);
export default app;
```
***
### loadHandlers()
> **loadHandlers**(...`handlers`): `void`
Defined in: [Honocord.ts:150](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L150)
Registers handlers for interactions.
#### Parameters
##### handlers
...[`FlatOrNestedArray`](/reference/types/FlatOrNestedArray)<[`AnyHandler`](/reference/types/AnyHandler)>
Array of CommandHandler, ComponentHandler, or ModalHandler instances
For an example of usage, see the [Example Repository](https://github.com/The-LukeZ/honocord-examples).
#### Returns
`void`
***
### use()
> **use**<`Context`>(...`middleware`): `this`
Defined in: [Honocord.ts:660](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L660)
Registers a middleware function to process interaction contexts.
Middleware receives the Hono context and a `next` callback:
- Access/modify context variables via `c.get()` and `c.set()`
- Access the interaction object via `c.var.command`, `c.var.component`, `c.var.modal`, or `c.var.autocomplete`
- Access environment bindings via `c.env`
- Call `await next()` to continue to the next middleware or handler
The context is passed by reference, so all modifications persist through the middleware chain and into handlers.
#### Type Parameters
##### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
#### Parameters
##### middleware
...[`MiddlewareFunction`](/reference/types/MiddlewareFunction)<`Context`>[]
The middleware function(s) to register.
#### Returns
`this`
The Honocord instance for chaining.
#### Example
```typescript
bot.use(async (c, next) => {
// Set custom data in context
c.set('startTime', Date.now());
// Continue to next middleware/handler
// you can also return next() directly if no post-processing is needed
await next();
// Code here runs after the handler completes
console.log('Duration:', Date.now() - c.get('startTime'));
});
```
***
### webhookHandler()
> **webhookHandler**(`c`): `Promise`<`any`>
Defined in: [Honocord.ts:684](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L684)
Returns a Hono handler for POST requests handling Discord webhook events.
On Cloudflare Workers, webhook events are processed asynchronously using `waitUntil`,
allowing immediate response to Discord while extending the worker's lifetime to complete processing.
#### Parameters
##### c
`Context`
#### Returns
`Promise`<`any`>
#### Example
```typescript
import { Hono } from "hono";
import { Honocord } from "honocord";
const app = new Hono();
const bot = new Honocord();
app.post("/webhook", bot.webhookHandler);
export default app;
```
***
### withCache()
> **withCache**<`TheEnv`>(`factory`): `this`
Defined in: [Honocord.ts:746](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/Honocord.ts#L746)
Registers a cache adapter factory for use throughout the bot.
The factory receives the request environment and returns a `BaseCacheAdapter` instance.
On Cloudflare Workers, use `DurableObjectCacheAdapter`.
On self-hosted environments, use `MemoryCacheAdapter`, `MongoCacheAdapter`, or `RedisAdapter`.
#### Type Parameters
##### TheEnv
`TheEnv` = `any`
#### Parameters
##### factory
(`env`) => `BaseCacheAdapter`
A function that receives the environment and returns a cache adapter.
#### Returns
`this`
The Honocord instance for chaining.
#### Example
```typescript
// Cloudflare Workers
bot.withCache((env) => new DurableObjectCacheAdapter(env.MY_CACHE));
// Self-hosted (pre-initialized)
const cache = new MongoCacheAdapter(process.env.MONGO_URI!);
await cache.connect();
bot.withCache(() => cache);
```
# MessageComponentInteraction
Defined in: [interactions/MessageComponentInteraction.ts:10](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L10)
Base class for message component interactions (buttons and select menus). Extended by
[ButtonInteraction](/reference/types/ButtonInteraction), [StringSelectInteraction](/reference/types/StringSelectInteraction), and the other select menu interactions.
## Extends
- `ModalCapableInteraction`<`InteractionType.MessageComponent`, `Context`>
## Extended by
- [`ButtonInteraction`](/reference/types/ButtonInteraction)
- [`StringSelectInteraction`](/reference/types/StringSelectInteraction)
- [`RoleSelectInteraction`](/reference/types/RoleSelectInteraction)
- [`UserSelectInteraction`](/reference/types/UserSelectInteraction)
- [`MentionableSelectInteraction`](/reference/types/MentionableSelectInteraction)
- [`ChannelSelectInteraction`](/reference/types/ChannelSelectInteraction)
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
### T
`T` *extends* [`MessageComponentType`](/reference/types/MessageComponentType) = [`MessageComponentType`](/reference/types/MessageComponentType)
## Constructors
### Constructor
> **new MessageComponentInteraction**<`Context`, `T`>(`api`, `interaction`, `c`): `MessageComponentInteraction`<`Context`, `T`>
Defined in: [interactions/MessageComponentInteraction.ts:21](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L21)
#### Parameters
##### api
`API`
##### interaction
[`MessageComponentInteractionPayload`](/reference/types/MessageComponentInteractionPayload)<`T`>
##### c
`Context`
#### Returns
`MessageComponentInteraction`<`Context`, `T`>
#### Overrides
`ModalCapableInteraction.constructor`
## Properties
### \_ephemeral
> `protected` **\_ephemeral**: `boolean` \| `null` = `null`
Defined in: [interactions/BaseInteraction.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L93)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`_ephemeral`](/reference/classes/BaseInteraction#_ephemeral)
***
### api
> `protected` **api**: `API`
Defined in: [interactions/BaseInteraction.ts:102](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L102)
#### Inherited from
`ModalCapableInteraction.api`
***
### componentType
> `readonly` **componentType**: `T`
Defined in: [interactions/MessageComponentInteraction.ts:19](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L19)
The message component's type (button, string select, etc).
***
### context
> `readonly` **context**: `Context`
Defined in: [interactions/BaseInteraction.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L97)
The Hono interaction context this interaction was created from.
#### Inherited from
`ModalCapableInteraction.context`
***
### customId
> `readonly` **customId**: `string`
Defined in: [interactions/MessageComponentInteraction.ts:17](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L17)
The component's custom ID, as set when it was built. See the [Custom ID System](/docs/custom-id-system) guide.
***
### deferred
> `protected` **deferred**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:95](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L95)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferred`](/reference/classes/BaseInteraction#deferred)
***
### fetcher
> `readonly` **fetcher**: [`Fetcher`](/reference/classes/Fetcher)
Defined in: [interactions/BaseInteraction.ts:99](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L99)
Cache-aware fetcher for resolving Discord entities referenced by this interaction.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`fetcher`](/reference/classes/BaseInteraction#fetcher)
***
### message
> `readonly` **message**: `APIMessage`
Defined in: [interactions/MessageComponentInteraction.ts:15](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L15)
The message the component is attached to.
***
### raw
> `protected` `readonly` **raw**: `APIMessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L90)
The raw interaction data
#### Inherited from
`ModalCapableInteraction.raw`
***
### replied
> `protected` **replied**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L94)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`replied`](/reference/classes/BaseInteraction#replied)
***
### rest
> `readonly` **rest**: `REST`
Defined in: [interactions/BaseInteraction.ts:92](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L92)
REST client used to make requests to the Discord API.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`rest`](/reference/classes/BaseInteraction#rest)
***
### type
> `readonly` **type**: `MessageComponent`
Defined in: [interactions/BaseInteraction.ts:88](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L88)
The interaction's Discord interaction type.
#### Inherited from
`ModalCapableInteraction.type`
## Accessors
### applicationId
#### Get Signature
> **get** **applicationId**(): `string`
Defined in: [interactions/BaseInteraction.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L114)
The ID of the application this interaction was sent to.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`applicationId`](/reference/classes/BaseInteraction#applicationid)
***
### appPermissions
#### Get Signature
> **get** **appPermissions**(): `string`
Defined in: [interactions/BaseInteraction.ts:179](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L179)
Bitwise set of permissions the app has in the source location of the interaction.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`appPermissions`](/reference/classes/BaseInteraction#apppermissions)
***
### channel
#### Get Signature
> **get** **channel**(): `Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L129)
The partial channel object the interaction was sent from, if any. Not cached — see [Honocord](/reference/classes/Honocord)'s runtime notes.
##### Returns
`Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
#### Inherited from
`ModalCapableInteraction.channel`
***
### channelId
#### Get Signature
> **get** **channelId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:124](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L124)
The ID of the channel the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`channelId`](/reference/classes/BaseInteraction#channelid)
***
### entitlements
#### Get Signature
> **get** **entitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:119](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L119)
Entitlements for the invoking user, for monetized apps.
##### Returns
`APIEntitlement`[]
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`entitlements`](/reference/classes/BaseInteraction#entitlements)
***
### guild
#### Get Signature
> **get** **guild**(): `APIPartialInteractionGuild` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:139](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L139)
The partial guild object the interaction was sent from, if any. Not cached.
##### Returns
`APIPartialInteractionGuild` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guild`](/reference/classes/BaseInteraction#guild)
***
### guildId
#### Get Signature
> **get** **guildId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:134](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L134)
The ID of the guild the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildId`](/reference/classes/BaseInteraction#guildid)
***
### guildLocale
#### Get Signature
> **get** **guildLocale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:164](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L164)
The guild's locale, if sent from a guild.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildLocale`](/reference/classes/BaseInteraction#guildlocale)
***
### id
#### Get Signature
> **get** **id**(): `string`
Defined in: [interactions/BaseInteraction.ts:174](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L174)
The interaction's ID.
##### Returns
`string`
#### Inherited from
`ModalCapableInteraction.id`
***
### locale
#### Get Signature
> **get** **locale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:159](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L159)
The invoking user's locale.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`locale`](/reference/classes/BaseInteraction#locale)
***
### member
#### Get Signature
> **get** **member**(): `APIInteractionGuildMember` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:154](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L154)
The guild member who triggered the interaction, if sent from a guild.
##### Returns
`APIInteractionGuildMember` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`member`](/reference/classes/BaseInteraction#member)
***
### token
#### Get Signature
> **get** **token**(): `string`
Defined in: [interactions/BaseInteraction.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L169)
The interaction token, used to send/edit/delete responses.
##### Returns
`string`
#### Inherited from
`ModalCapableInteraction.token`
***
### user
#### Get Signature
> **get** **user**(): `APIUser`
Defined in: [interactions/BaseInteraction.ts:149](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L149)
The user who triggered the interaction (resolved from `member.user` in guilds, `user` in DMs).
##### Returns
`APIUser`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`user`](/reference/classes/BaseInteraction#user)
***
### userId
#### Get Signature
> **get** **userId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L144)
The ID of the user who triggered the interaction.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`userId`](/reference/classes/BaseInteraction#userid)
***
### version
#### Get Signature
> **get** **version**(): `1`
Defined in: [interactions/BaseInteraction.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L184)
Discord's interaction payload version (always `1`).
##### Returns
`1`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`version`](/reference/classes/BaseInteraction#version)
## Methods
### deferReply()
> **deferReply**(`forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L296)
Acknowledges the interaction without sending an initial response, showing a "thinking" state.
Use `editReply` afterwards to send the actual response, within the 15-minute interaction token lifetime.
#### Parameters
##### forceEphemeral?
`boolean` = `true`
Whether the eventual response should be ephemeral. Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
#### Inherited from
`ModalCapableInteraction.deferReply`
***
### deferUpdate()
> **deferUpdate**(): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:321](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L321)
Defers the update of a component interaction.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
A promise that resolves when the update is deferred
Responding to a component interaction via the deferUpdate() method acknowledges the interaction and resets the message state.
This method can be used to suppress the need for further responses, however it's encouraged to provide meaningful feedback to users via an update() or ephemeral reply() at least.\
Once deferUpdate() has been called, future messages can be sent by calling followUp() or edits can be made by calling editReply() on the component interaction.
Example flow:
1. User clicks a button.
2. Bot calls `deferUpdate()` to acknowledge the interaction.
3. Bot performs some processing.
4. Bot calls `editReply()` to update the original message.
#### Inherited from
`ModalCapableInteraction.deferUpdate`
***
### deleteReply()
> **deleteReply**(`messageId?`): `Promise`<`void`>
Defined in: [interactions/BaseInteraction.ts:359](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L359)
Deletes the original interaction response (or a follow-up message).
#### Parameters
##### messageId?
`string`
The message id to delete, defaults to `@original`
#### Returns
`Promise`<`void`>
A promise that resolves when the message is deleted
This is used to delete the original interaction response message or a follow-up message.
#### Inherited from
`ModalCapableInteraction.deleteReply`
***
### editReply()
> **editReply**(`options`, `messageId?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:336](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L336)
Edits the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to edit the message with
##### messageId?
`string` = `"@original"`
The message id to edit, defaults to `@original`
#### Returns
`Promise`<`APIMessage`>
The edited message
This is used to edit the original interaction response message.
Before using this method, the interaction needs to be replied to first before using this method - with `reply`, `deferReply` or `update`.
#### Inherited from
`ModalCapableInteraction.editReply`
***
### followUp()
> **followUp**(`options`, `forceEphemeral?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:397](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L397)
Sends a follow-up message to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to send the follow-up message with
##### forceEphemeral?
`boolean` = `false`
Whether to force the message to be ephemeral
#### Returns
`Promise`<`APIMessage`>
The sent follow-up message
This is used to send additional messages after the initial interaction response.
#### Inherited from
`ModalCapableInteraction.followUp`
***
### getAppEntitlements()
> **getAppEntitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:207](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L207)
Returns entitlements belonging to this interaction's application.
#### Returns
`APIEntitlement`[]
#### Inherited from
`ModalCapableInteraction.getAppEntitlements`
***
### guildHavePremium()
> **guildHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:212](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L212)
Whether the guild this interaction was sent from currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
`ModalCapableInteraction.guildHavePremium`
***
### inDM()
> **inDM**(): `this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
Defined in: [interactions/BaseInteraction.ts:202](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L202)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to `undefined` when the interaction was sent from a DM.
#### Returns
`this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
#### Inherited from
`ModalCapableInteraction.inDM`
***
### inGuild()
> **inGuild**(): `this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
Defined in: [interactions/BaseInteraction.ts:197](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L197)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to defined when the interaction was sent from a guild.
#### Returns
`this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
#### Inherited from
`ModalCapableInteraction.inGuild`
***
### isAutocomplete()
> **isAutocomplete**(): `this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
Defined in: [interactions/BaseInteraction.ts:490](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L490)
Type guard: whether this is an autocomplete request for a slash command option.
#### Returns
`this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
#### Inherited from
`ModalCapableInteraction.isAutocomplete`
***
### isButton()
> **isButton**(): `this is ButtonInteraction`
Defined in: [interactions/BaseInteraction.ts:460](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L460)
Type guard: whether this is a button click interaction.
#### Returns
`this is ButtonInteraction`
#### Inherited from
`ModalCapableInteraction.isButton`
***
### isChannelSelect()
> **isChannelSelect**(): `this is ChannelSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:485](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L485)
Type guard: whether this is a channel select menu interaction.
#### Returns
`this is ChannelSelectInteraction`
#### Inherited from
`ModalCapableInteraction.isChannelSelect`
***
### isChatInputCommand()
> **isChatInputCommand**(): `this is ChatInputCommandInteraction`
Defined in: [interactions/BaseInteraction.ts:421](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L421)
Type guard: whether this is a chat input (slash) command interaction.
#### Returns
`this is ChatInputCommandInteraction`
#### Inherited from
`ModalCapableInteraction.isChatInputCommand`
***
### isCommand()
> **isCommand**(): `this is CommandInteraction`
Defined in: [interactions/BaseInteraction.ts:416](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L416)
Type guard: whether this is an application command interaction (slash command or context menu command).
#### Returns
`this is CommandInteraction`
#### Inherited from
`ModalCapableInteraction.isCommand`
***
### isJSONEncodable()
> `protected` **isJSONEncodable**(`obj`): `obj is JSONEncodable`
Defined in: [interactions/BaseInteraction.ts:188](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L188)
#### Parameters
##### obj
`unknown`
#### Returns
`obj is JSONEncodable`
#### Inherited from
`ModalCapableInteraction.isJSONEncodable`
***
### isMentionableSelect()
> **isMentionableSelect**(): `this is MentionableSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:480](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L480)
Type guard: whether this is a mentionable (user + role) select menu interaction.
#### Returns
`this is MentionableSelectInteraction`
#### Inherited from
`ModalCapableInteraction.isMentionableSelect`
***
### isMessageComponent()
> **isMessageComponent**(): `this is MessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:455](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L455)
Type guard: whether this is a message component interaction (button or select menu).
#### Returns
`this is MessageComponentInteraction`
#### Inherited from
`ModalCapableInteraction.isMessageComponent`
***
### isMessageContextCommand()
> **isMessageContextCommand**(): `this is MessageContextInteraction`
Defined in: [interactions/BaseInteraction.ts:437](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L437)
Type guard: whether this is a message context menu command interaction.
#### Returns
`this is MessageContextInteraction`
#### Inherited from
`ModalCapableInteraction.isMessageContextCommand`
***
### isMessageModal()
> **isMessageModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:450](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L450)
Type guard: whether this is a modal submit interaction that opened from a message (not a slash command).
#### Returns
`this is ModalInteraction`
#### Inherited from
`ModalCapableInteraction.isMessageModal`
***
### isModal()
> **isModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:445](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L445)
Type guard: whether this is a modal submit interaction.
#### Returns
`this is ModalInteraction`
#### Inherited from
`ModalCapableInteraction.isModal`
***
### isRoleSelect()
> **isRoleSelect**(): `this is RoleSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:475](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L475)
Type guard: whether this is a role select menu interaction.
#### Returns
`this is RoleSelectInteraction`
#### Inherited from
`ModalCapableInteraction.isRoleSelect`
***
### isStringSelect()
> **isStringSelect**(): `this is StringSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:465](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L465)
Type guard: whether this is a string select menu interaction.
#### Returns
`this is StringSelectInteraction`
#### Inherited from
`ModalCapableInteraction.isStringSelect`
***
### isUserContextCommand()
> **isUserContextCommand**(): `this is UserContextInteraction`
Defined in: [interactions/BaseInteraction.ts:429](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L429)
Type guard: whether this is a user context menu command interaction.
#### Returns
`this is UserContextInteraction`
#### Inherited from
`ModalCapableInteraction.isUserContextCommand`
***
### isUserSelect()
> **isUserSelect**(): `this is UserSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:470](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L470)
Type guard: whether this is a user select menu interaction.
#### Returns
`this is UserSelectInteraction`
#### Inherited from
`ModalCapableInteraction.isUserSelect`
***
### reply()
> **reply**(`options`, `forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:273](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L273)
Sends the initial response to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The message content, or a string shorthand for `{ content: options }`
##### forceEphemeral?
`boolean` = `true`
Whether to force the response to be ephemeral (visible only to the invoking user). Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The created interaction response, including the created message.
#### Inherited from
`ModalCapableInteraction.reply`
***
### showModal()
> **showModal**(`data`): `Promise`<`undefined`>
Defined in: [interactions/ModalCapableInteraction.ts:16](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalCapableInteraction.ts#L16)
Responds to the interaction with a modal.
#### Parameters
##### data
[`ModalInteractionResponseCallbackData`](/reference/types/ModalInteractionResponseCallbackData) \| `ModalBuilder`
The modal data to send
#### Returns
`Promise`<`undefined`>
#### Inherited from
`ModalCapableInteraction.showModal`
***
### toSnakeCase()
> `protected` **toSnakeCase**<`T`>(`obj`): `T`
Defined in: [interactions/BaseInteraction.ts:192](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L192)
#### Type Parameters
##### T
`T` = `unknown`
#### Parameters
##### obj
`unknown`
#### Returns
`T`
#### Inherited from
`ModalCapableInteraction.toSnakeCase`
***
### update()
> **update**(`options`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:374](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L374)
Updates the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to update the message with
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The updated message
This is mainly used for component interactions where you want to update the message the component is attached to OR for
moodal submit interactions to update the message that opened the modal.
After calling this method, the interaction is considered replied and you need to use `editReply` to edit the original response.
#### Inherited from
`ModalCapableInteraction.update`
***
### userHavePremium()
> **userHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:222](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L222)
Whether the user who triggered this interaction currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
`ModalCapableInteraction.userHavePremium`
# ModalComponentResolver
Defined in: [resolvers/ModalComponentResolver.ts:65](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L65)
Resolves field values from a modal submission by custom ID, with entity lookups (users, members,
roles, channels, attachments) already resolved. Available as `interaction.fields` on `ModalInteraction`.
## Constructors
### Constructor
> **new ModalComponentResolver**(`components`, `resolved?`): `ModalComponentResolver`
Defined in: [resolvers/ModalComponentResolver.ts:69](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L69)
#### Parameters
##### components
(`ModalSubmitLabelComponent` \| `ModalSubmitTextDisplayComponent`)[]
##### resolved?
`APIInteractionDataResolved`
#### Returns
`ModalComponentResolver`
## Accessors
### data
#### Get Signature
> **get** **data**(): [`APIModalData`](/reference/types/APIModalData)[]
Defined in: [resolvers/ModalComponentResolver.ts:101](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L101)
##### Returns
[`APIModalData`](/reference/types/APIModalData)[]
## Methods
### fieldExists()
> **fieldExists**(`custom_id`): `boolean`
Defined in: [resolvers/ModalComponentResolver.ts:110](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L110)
Checks if a component with the given custom ID exists in the modal.
#### Parameters
##### custom\_id
`string`
The custom ID of the component to check for.
#### Returns
`boolean`
True if a component with the given custom ID exists, false otherwise.
***
### getAllComponents()
> **getAllComponents**(): [`APIModalData`](/reference/types/APIModalData)[]
Defined in: [resolvers/ModalComponentResolver.ts:357](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L357)
Returns the resolved data for every component in the modal.
#### Returns
[`APIModalData`](/reference/types/APIModalData)[]
***
### getCheckboxGroupValues()
#### Call Signature
> **getCheckboxGroupValues**(`custom_id`, `required?`): `string`[] \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:329](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L329)
Gets the checked values of a checkbox group component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a checkbox group.
##### Returns
`string`[] \| `null`
The checked values, or null if not set and not required.
#### Call Signature
> **getCheckboxGroupValues**(`custom_id`, `required`): `string`[]
Defined in: [resolvers/ModalComponentResolver.ts:330](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L330)
Gets the checked values of a checkbox group component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a checkbox group.
##### Returns
`string`[]
The checked values, or null if not set and not required.
***
### getCheckboxValue()
#### Call Signature
> **getCheckboxValue**(`custom_id`, `required?`): `boolean` \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:346](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L346)
Gets the checked state of a checkbox component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a checkbox.
##### Returns
`boolean` \| `null`
The checked state, or null if not set and not required.
#### Call Signature
> **getCheckboxValue**(`custom_id`, `required`): `boolean`
Defined in: [resolvers/ModalComponentResolver.ts:347](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L347)
Gets the checked state of a checkbox component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a checkbox.
##### Returns
`boolean`
The checked state, or null if not set and not required.
***
### getComponent()
> **getComponent**(`custom_id`): [`APIModalData`](/reference/types/APIModalData)
Defined in: [resolvers/ModalComponentResolver.ts:120](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L120)
Gets a component's resolved data by its custom ID.
#### Parameters
##### custom\_id
`string`
The custom ID of the component to get.
#### Returns
[`APIModalData`](/reference/types/APIModalData)
#### Throws
If no component with the given custom ID exists.
***
### getFiles()
#### Call Signature
> **getFiles**(`custom_id`, `required?`): `Collection`<`string`, `APIAttachment`> \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:290](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L290)
Gets the uploaded files from a file upload component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a file upload.
##### Returns
`Collection`<`string`, `APIAttachment`> \| `null`
The uploaded files, or null if not set and not required.
#### Call Signature
> **getFiles**(`custom_id`, `required`): `Collection`<`string`, `APIAttachment`>
Defined in: [resolvers/ModalComponentResolver.ts:291](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L291)
Gets the uploaded files from a file upload component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a file upload.
##### Returns
`Collection`<`string`, `APIAttachment`>
The uploaded files, or null if not set and not required.
***
### getRadioGroupValue()
#### Call Signature
> **getRadioGroupValue**(`custom_id`, `required?`): `string` \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:312](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L312)
Gets the selected value of a radio group component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a radio group.
##### Returns
`string` \| `null`
The selected value, or null if not set and not required.
#### Call Signature
> **getRadioGroupValue**(`custom_id`, `required`): `string`
Defined in: [resolvers/ModalComponentResolver.ts:313](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L313)
Gets the selected value of a radio group component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a radio group.
##### Returns
`string`
The selected value, or null if not set and not required.
***
### getSelectedChannels()
#### Call Signature
> **getSelectedChannels**(`custom_id`, `required?`): `Collection`<`string`, `APIInteractionDataResolvedChannel`> \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L169)
Gets the selected channels from a channel select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a channel select.
##### Returns
`Collection`<`string`, `APIInteractionDataResolvedChannel`> \| `null`
The selected channels, or null if not set and not required.
#### Call Signature
> **getSelectedChannels**(`custom_id`, `required`): `Collection`<`string`, `APIInteractionDataResolvedChannel`>
Defined in: [resolvers/ModalComponentResolver.ts:170](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L170)
Gets the selected channels from a channel select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a channel select.
##### Returns
`Collection`<`string`, `APIInteractionDataResolvedChannel`>
The selected channels, or null if not set and not required.
***
### getSelectedMembers()
#### Call Signature
> **getSelectedMembers**(`custom_id`, `required?`): `Collection`<`string`, [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)> \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:214](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L214)
Gets the selected members from a user select menu (if in guild).
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a user select.
##### Returns
`Collection`<`string`, [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)> \| `null`
The selected members, or null if not set and not required.
#### Call Signature
> **getSelectedMembers**(`custom_id`, `required`): `Collection`<`string`, [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)>
Defined in: [resolvers/ModalComponentResolver.ts:215](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L215)
Gets the selected members from a user select menu (if in guild).
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a user select.
##### Returns
`Collection`<`string`, [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)>
The selected members, or null if not set and not required.
***
### getSelectedMentionables()
#### Call Signature
> **getSelectedMentionables**(`custom_id`, `required?`): (`APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember))[] \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:256](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L256)
Gets the selected mentionables from a mentionable select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a mentionable select.
##### Returns
(`APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember))[] \| `null`
The selected mentionables (users, members, or roles), or null if not set and not required.
#### Call Signature
> **getSelectedMentionables**(`custom_id`, `required`): (`APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember))[]
Defined in: [resolvers/ModalComponentResolver.ts:257](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L257)
Gets the selected mentionables from a mentionable select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a mentionable select.
##### Returns
(`APIRole` \| `APIUser` \| [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember))[]
The selected mentionables (users, members, or roles), or null if not set and not required.
***
### getSelectedRoles()
#### Call Signature
> **getSelectedRoles**(`custom_id`, `required?`): `Collection`<`string`, `APIRole`> \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:237](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L237)
Gets the selected roles from a role select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a role select.
##### Returns
`Collection`<`string`, `APIRole`> \| `null`
The selected roles, or null if not set and not required.
#### Call Signature
> **getSelectedRoles**(`custom_id`, `required`): `Collection`<`string`, `APIRole`>
Defined in: [resolvers/ModalComponentResolver.ts:238](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L238)
Gets the selected roles from a role select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a role select.
##### Returns
`Collection`<`string`, `APIRole`>
The selected roles, or null if not set and not required.
***
### getSelectedUsers()
#### Call Signature
> **getSelectedUsers**(`custom_id`, `required?`): `Collection`<`string`, `APIUser`> \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:195](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L195)
Gets the selected users from a user select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a user select.
##### Returns
`Collection`<`string`, `APIUser`> \| `null`
The selected users, or null if not set and not required.
#### Call Signature
> **getSelectedUsers**(`custom_id`, `required`): `Collection`<`string`, `APIUser`>
Defined in: [resolvers/ModalComponentResolver.ts:196](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L196)
Gets the selected users from a user select menu.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a user select.
##### Returns
`Collection`<`string`, `APIUser`>
The selected users, or null if not set and not required.
***
### getSelectedValues()
#### Call Signature
> **getSelectedValues**(`custom_id`, `required?`): readonly `string`[] \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:152](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L152)
Gets the selected values of a select menu component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a select menu.
##### Returns
readonly `string`[] \| `null`
The selected values, or null if not set and not required.
#### Call Signature
> **getSelectedValues**(`custom_id`, `required`): readonly `string`[]
Defined in: [resolvers/ModalComponentResolver.ts:153](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L153)
Gets the selected values of a select menu component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a select menu.
##### Returns
readonly `string`[]
The selected values, or null if not set and not required.
***
### getString()
#### Call Signature
> **getString**(`custom_id`, `required?`): `string` \| `null`
Defined in: [resolvers/ModalComponentResolver.ts:135](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L135)
Gets the value of a text input component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required?
`boolean`
Whether to throw an error if the component is not found or not a text input.
##### Returns
`string` \| `null`
The value of the text input, or null if not set and not required.
#### Call Signature
> **getString**(`custom_id`, `required`): `string`
Defined in: [resolvers/ModalComponentResolver.ts:136](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L136)
Gets the value of a text input component.
##### Parameters
###### custom\_id
`string`
The custom ID of the component.
###### required
`true`
Whether to throw an error if the component is not found or not a text input.
##### Returns
`string`
The value of the text input, or null if not set and not required.
# ModalHandler
Defined in: [handlers/ModalHandler.ts:8](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ModalHandler.ts#L8)
Handler for modal submits based on custom ID prefix
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new ModalHandler**<`Context`>(`prefix`, `handler?`): `ModalHandler`<`Context`>
Defined in: [handlers/ModalHandler.ts:17](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ModalHandler.ts#L17)
#### Parameters
##### prefix
`string`
The custom ID prefix this handler matches against. See the [Custom ID System](/docs/custom-id-system) guide.
##### handler?
(`interaction`) => `any`
Optional handler function, equivalent to calling `addHandler` afterwards
#### Returns
`ModalHandler`<`Context`>
## Properties
### handlerType
> `readonly` **handlerType**: `"modal"` = `"modal"`
Defined in: [handlers/ModalHandler.ts:9](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ModalHandler.ts#L9)
***
### prefix
> `readonly` **prefix**: `string`
Defined in: [handlers/ModalHandler.ts:10](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ModalHandler.ts#L10)
## Methods
### addHandler()
> **addHandler**(`handler`): `ModalHandler`<`Context`>
Defined in: [handlers/ModalHandler.ts:32](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ModalHandler.ts#L32)
Adds the modal handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the modal submit interaction
#### Returns
`ModalHandler`<`Context`>
The current ModalHandler instance
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/ModalHandler.ts:40](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ModalHandler.ts#L40)
Executes the modal handler
#### Parameters
##### interaction
[`ModalInteraction`](/reference/classes/ModalInteraction)<`Context`>
#### Returns
`Promise`<`void`>
***
### matches()
> **matches**(`customId`): `boolean`
Defined in: [handlers/ModalHandler.ts:50](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/ModalHandler.ts#L50)
Checks if this handler matches the given custom ID
#### Parameters
##### customId
`string`
#### Returns
`boolean`
# ModalInteraction
Defined in: [interactions/ModalInteraction.ts:14](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalInteraction.ts#L14)
A modal submit interaction. Passed to `ModalHandler.execute`.
## Extends
- [`BaseInteraction`](/reference/classes/BaseInteraction)<`InteractionType.ModalSubmit`, `Context`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new ModalInteraction**<`Context`>(`api`, `interaction`, `c`): `ModalInteraction`<`Context`>
Defined in: [interactions/ModalInteraction.ts:25](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalInteraction.ts#L25)
#### Parameters
##### api
`API`
##### interaction
`APIModalSubmitInteraction`
##### c
`Context`
#### Returns
`ModalInteraction`<`Context`>
#### Overrides
[`BaseInteraction`](/reference/classes/BaseInteraction).[`constructor`](/reference/classes/BaseInteraction#constructor)
## Properties
### \_ephemeral
> `protected` **\_ephemeral**: `boolean` \| `null` = `null`
Defined in: [interactions/BaseInteraction.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L93)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`_ephemeral`](/reference/classes/BaseInteraction#_ephemeral)
***
### api
> `protected` **api**: `API`
Defined in: [interactions/BaseInteraction.ts:102](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L102)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`api`](/reference/classes/BaseInteraction#api)
***
### context
> `readonly` **context**: `Context`
Defined in: [interactions/BaseInteraction.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L97)
The Hono interaction context this interaction was created from.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`context`](/reference/classes/BaseInteraction#context-1)
***
### customId
> `readonly` **customId**: `string`
Defined in: [interactions/ModalInteraction.ts:23](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalInteraction.ts#L23)
The modal's custom ID, as set when it was built. See the [Custom ID System](/docs/custom-id-system) guide.
***
### deferred
> `protected` **deferred**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:95](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L95)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferred`](/reference/classes/BaseInteraction#deferred)
***
### fetcher
> `readonly` **fetcher**: [`Fetcher`](/reference/classes/Fetcher)
Defined in: [interactions/BaseInteraction.ts:99](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L99)
Cache-aware fetcher for resolving Discord entities referenced by this interaction.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`fetcher`](/reference/classes/BaseInteraction#fetcher)
***
### fields
> `readonly` **fields**: [`ModalComponentResolver`](/reference/classes/ModalComponentResolver)
Defined in: [interactions/ModalInteraction.ts:19](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalInteraction.ts#L19)
Resolver for reading the submitted modal field values.
***
### message?
> `readonly` `optional` **message?**: `APIMessage`
Defined in: [interactions/ModalInteraction.ts:21](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalInteraction.ts#L21)
The message the modal was opened from, if it was opened in response to a message component interaction.
***
### raw
> `protected` `readonly` **raw**: `APIModalSubmitInteraction`
Defined in: [interactions/BaseInteraction.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L90)
The raw interaction data
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`raw`](/reference/classes/BaseInteraction#raw)
***
### replied
> `protected` **replied**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L94)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`replied`](/reference/classes/BaseInteraction#replied)
***
### rest
> `readonly` **rest**: `REST`
Defined in: [interactions/BaseInteraction.ts:92](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L92)
REST client used to make requests to the Discord API.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`rest`](/reference/classes/BaseInteraction#rest)
***
### type
> `readonly` **type**: `ModalSubmit`
Defined in: [interactions/BaseInteraction.ts:88](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L88)
The interaction's Discord interaction type.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`type`](/reference/classes/BaseInteraction#type-1)
## Accessors
### applicationId
#### Get Signature
> **get** **applicationId**(): `string`
Defined in: [interactions/BaseInteraction.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L114)
The ID of the application this interaction was sent to.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`applicationId`](/reference/classes/BaseInteraction#applicationid)
***
### appPermissions
#### Get Signature
> **get** **appPermissions**(): `string`
Defined in: [interactions/BaseInteraction.ts:179](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L179)
Bitwise set of permissions the app has in the source location of the interaction.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`appPermissions`](/reference/classes/BaseInteraction#apppermissions)
***
### channel
#### Get Signature
> **get** **channel**(): `Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L129)
The partial channel object the interaction was sent from, if any. Not cached — see [Honocord](/reference/classes/Honocord)'s runtime notes.
##### Returns
`Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`channel`](/reference/classes/BaseInteraction#channel)
***
### channelId
#### Get Signature
> **get** **channelId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:124](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L124)
The ID of the channel the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`channelId`](/reference/classes/BaseInteraction#channelid)
***
### entitlements
#### Get Signature
> **get** **entitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:119](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L119)
Entitlements for the invoking user, for monetized apps.
##### Returns
`APIEntitlement`[]
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`entitlements`](/reference/classes/BaseInteraction#entitlements)
***
### guild
#### Get Signature
> **get** **guild**(): `APIPartialInteractionGuild` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:139](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L139)
The partial guild object the interaction was sent from, if any. Not cached.
##### Returns
`APIPartialInteractionGuild` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guild`](/reference/classes/BaseInteraction#guild)
***
### guildId
#### Get Signature
> **get** **guildId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:134](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L134)
The ID of the guild the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildId`](/reference/classes/BaseInteraction#guildid)
***
### guildLocale
#### Get Signature
> **get** **guildLocale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:164](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L164)
The guild's locale, if sent from a guild.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildLocale`](/reference/classes/BaseInteraction#guildlocale)
***
### id
#### Get Signature
> **get** **id**(): `string`
Defined in: [interactions/BaseInteraction.ts:174](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L174)
The interaction's ID.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`id`](/reference/classes/BaseInteraction#id)
***
### locale
#### Get Signature
> **get** **locale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:159](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L159)
The invoking user's locale.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`locale`](/reference/classes/BaseInteraction#locale)
***
### member
#### Get Signature
> **get** **member**(): `APIInteractionGuildMember` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:154](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L154)
The guild member who triggered the interaction, if sent from a guild.
##### Returns
`APIInteractionGuildMember` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`member`](/reference/classes/BaseInteraction#member)
***
### token
#### Get Signature
> **get** **token**(): `string`
Defined in: [interactions/BaseInteraction.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L169)
The interaction token, used to send/edit/delete responses.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`token`](/reference/classes/BaseInteraction#token)
***
### user
#### Get Signature
> **get** **user**(): `APIUser`
Defined in: [interactions/BaseInteraction.ts:149](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L149)
The user who triggered the interaction (resolved from `member.user` in guilds, `user` in DMs).
##### Returns
`APIUser`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`user`](/reference/classes/BaseInteraction#user)
***
### userId
#### Get Signature
> **get** **userId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L144)
The ID of the user who triggered the interaction.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`userId`](/reference/classes/BaseInteraction#userid)
***
### version
#### Get Signature
> **get** **version**(): `1`
Defined in: [interactions/BaseInteraction.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L184)
Discord's interaction payload version (always `1`).
##### Returns
`1`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`version`](/reference/classes/BaseInteraction#version)
## Methods
### deferReply()
> **deferReply**(`forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L296)
Acknowledges the interaction without sending an initial response, showing a "thinking" state.
Use `editReply` afterwards to send the actual response, within the 15-minute interaction token lifetime.
#### Parameters
##### forceEphemeral?
`boolean` = `true`
Whether the eventual response should be ephemeral. Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferReply`](/reference/classes/BaseInteraction#deferreply)
***
### deferUpdate()
> **deferUpdate**(): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:321](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L321)
Defers the update of a component interaction.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
A promise that resolves when the update is deferred
Responding to a component interaction via the deferUpdate() method acknowledges the interaction and resets the message state.
This method can be used to suppress the need for further responses, however it's encouraged to provide meaningful feedback to users via an update() or ephemeral reply() at least.\
Once deferUpdate() has been called, future messages can be sent by calling followUp() or edits can be made by calling editReply() on the component interaction.
Example flow:
1. User clicks a button.
2. Bot calls `deferUpdate()` to acknowledge the interaction.
3. Bot performs some processing.
4. Bot calls `editReply()` to update the original message.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferUpdate`](/reference/classes/BaseInteraction#deferupdate)
***
### deleteReply()
> **deleteReply**(`messageId?`): `Promise`<`void`>
Defined in: [interactions/BaseInteraction.ts:359](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L359)
Deletes the original interaction response (or a follow-up message).
#### Parameters
##### messageId?
`string`
The message id to delete, defaults to `@original`
#### Returns
`Promise`<`void`>
A promise that resolves when the message is deleted
This is used to delete the original interaction response message or a follow-up message.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deleteReply`](/reference/classes/BaseInteraction#deletereply)
***
### editReply()
> **editReply**(`options`, `messageId?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:336](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L336)
Edits the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to edit the message with
##### messageId?
`string` = `"@original"`
The message id to edit, defaults to `@original`
#### Returns
`Promise`<`APIMessage`>
The edited message
This is used to edit the original interaction response message.
Before using this method, the interaction needs to be replied to first before using this method - with `reply`, `deferReply` or `update`.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`editReply`](/reference/classes/BaseInteraction#editreply)
***
### followUp()
> **followUp**(`options`, `forceEphemeral?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:397](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L397)
Sends a follow-up message to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to send the follow-up message with
##### forceEphemeral?
`boolean` = `false`
Whether to force the message to be ephemeral
#### Returns
`Promise`<`APIMessage`>
The sent follow-up message
This is used to send additional messages after the initial interaction response.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`followUp`](/reference/classes/BaseInteraction#followup)
***
### getAppEntitlements()
> **getAppEntitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:207](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L207)
Returns entitlements belonging to this interaction's application.
#### Returns
`APIEntitlement`[]
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`getAppEntitlements`](/reference/classes/BaseInteraction#getappentitlements)
***
### guildHavePremium()
> **guildHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:212](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L212)
Whether the guild this interaction was sent from currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildHavePremium`](/reference/classes/BaseInteraction#guildhavepremium)
***
### inDM()
> **inDM**(): `this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
Defined in: [interactions/BaseInteraction.ts:202](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L202)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to `undefined` when the interaction was sent from a DM.
#### Returns
`this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`inDM`](/reference/classes/BaseInteraction#indm)
***
### inGuild()
> **inGuild**(): `this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
Defined in: [interactions/BaseInteraction.ts:197](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L197)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to defined when the interaction was sent from a guild.
#### Returns
`this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`inGuild`](/reference/classes/BaseInteraction#inguild)
***
### isAutocomplete()
> **isAutocomplete**(): `this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
Defined in: [interactions/BaseInteraction.ts:490](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L490)
Type guard: whether this is an autocomplete request for a slash command option.
#### Returns
`this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isAutocomplete`](/reference/classes/BaseInteraction#isautocomplete)
***
### isButton()
> **isButton**(): `this is ButtonInteraction`
Defined in: [interactions/BaseInteraction.ts:460](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L460)
Type guard: whether this is a button click interaction.
#### Returns
`this is ButtonInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isButton`](/reference/classes/BaseInteraction#isbutton)
***
### isChannelSelect()
> **isChannelSelect**(): `this is ChannelSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:485](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L485)
Type guard: whether this is a channel select menu interaction.
#### Returns
`this is ChannelSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isChannelSelect`](/reference/classes/BaseInteraction#ischannelselect)
***
### isChatInputCommand()
> **isChatInputCommand**(): `this is ChatInputCommandInteraction`
Defined in: [interactions/BaseInteraction.ts:421](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L421)
Type guard: whether this is a chat input (slash) command interaction.
#### Returns
`this is ChatInputCommandInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isChatInputCommand`](/reference/classes/BaseInteraction#ischatinputcommand)
***
### isCommand()
> **isCommand**(): `this is CommandInteraction`
Defined in: [interactions/BaseInteraction.ts:416](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L416)
Type guard: whether this is an application command interaction (slash command or context menu command).
#### Returns
`this is CommandInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isCommand`](/reference/classes/BaseInteraction#iscommand)
***
### isJSONEncodable()
> `protected` **isJSONEncodable**(`obj`): `obj is JSONEncodable`
Defined in: [interactions/BaseInteraction.ts:188](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L188)
#### Parameters
##### obj
`unknown`
#### Returns
`obj is JSONEncodable`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isJSONEncodable`](/reference/classes/BaseInteraction#isjsonencodable)
***
### isMentionableSelect()
> **isMentionableSelect**(): `this is MentionableSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:480](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L480)
Type guard: whether this is a mentionable (user + role) select menu interaction.
#### Returns
`this is MentionableSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMentionableSelect`](/reference/classes/BaseInteraction#ismentionableselect)
***
### isMessageComponent()
> **isMessageComponent**(): `this is MessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:455](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L455)
Type guard: whether this is a message component interaction (button or select menu).
#### Returns
`this is MessageComponentInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMessageComponent`](/reference/classes/BaseInteraction#ismessagecomponent)
***
### isMessageContextCommand()
> **isMessageContextCommand**(): `this is MessageContextInteraction`
Defined in: [interactions/BaseInteraction.ts:437](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L437)
Type guard: whether this is a message context menu command interaction.
#### Returns
`this is MessageContextInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMessageContextCommand`](/reference/classes/BaseInteraction#ismessagecontextcommand)
***
### isMessageModal()
> **isMessageModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:450](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L450)
Type guard: whether this is a modal submit interaction that opened from a message (not a slash command).
#### Returns
`this is ModalInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMessageModal`](/reference/classes/BaseInteraction#ismessagemodal)
***
### isModal()
> **isModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:445](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L445)
Type guard: whether this is a modal submit interaction.
#### Returns
`this is ModalInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isModal`](/reference/classes/BaseInteraction#ismodal)
***
### isRoleSelect()
> **isRoleSelect**(): `this is RoleSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:475](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L475)
Type guard: whether this is a role select menu interaction.
#### Returns
`this is RoleSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isRoleSelect`](/reference/classes/BaseInteraction#isroleselect)
***
### isStringSelect()
> **isStringSelect**(): `this is StringSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:465](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L465)
Type guard: whether this is a string select menu interaction.
#### Returns
`this is StringSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isStringSelect`](/reference/classes/BaseInteraction#isstringselect)
***
### isUserContextCommand()
> **isUserContextCommand**(): `this is UserContextInteraction`
Defined in: [interactions/BaseInteraction.ts:429](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L429)
Type guard: whether this is a user context menu command interaction.
#### Returns
`this is UserContextInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isUserContextCommand`](/reference/classes/BaseInteraction#isusercontextcommand)
***
### isUserSelect()
> **isUserSelect**(): `this is UserSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:470](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L470)
Type guard: whether this is a user select menu interaction.
#### Returns
`this is UserSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isUserSelect`](/reference/classes/BaseInteraction#isuserselect)
***
### reply()
> **reply**(`options`, `forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:273](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L273)
Sends the initial response to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The message content, or a string shorthand for `{ content: options }`
##### forceEphemeral?
`boolean` = `true`
Whether to force the response to be ephemeral (visible only to the invoking user). Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The created interaction response, including the created message.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`reply`](/reference/classes/BaseInteraction#reply)
***
### toSnakeCase()
> `protected` **toSnakeCase**<`T`>(`obj`): `T`
Defined in: [interactions/BaseInteraction.ts:192](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L192)
#### Type Parameters
##### T
`T` = `unknown`
#### Parameters
##### obj
`unknown`
#### Returns
`T`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`toSnakeCase`](/reference/classes/BaseInteraction#tosnakecase)
***
### update()
> **update**(`options`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:374](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L374)
Updates the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to update the message with
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The updated message
This is mainly used for component interactions where you want to update the message the component is attached to OR for
moodal submit interactions to update the message that opened the modal.
After calling this method, the interaction is considered replied and you need to use `editReply` to edit the original response.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`update`](/reference/classes/BaseInteraction#update)
***
### userHavePremium()
> **userHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:222](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L222)
Whether the user who triggered this interaction currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`userHavePremium`](/reference/classes/BaseInteraction#userhavepremium)
# SlashCommandHandler
Defined in: [handlers/SlashCommandHandler.ts:22](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L22)
Handler for chat input commands with optional autocomplete support
## Extends
- `SlashCommandBuilder`
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Constructors
### Constructor
> **new SlashCommandHandler**<`Context`>(): `SlashCommandHandler`<`Context`>
#### Returns
`SlashCommandHandler`<`Context`>
#### Inherited from
`SlashCommandBuilder.constructor`
## Properties
### guildIds
> `readonly` **guildIds**: `Set`<`string`>
Defined in: [handlers/SlashCommandHandler.ts:29](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L29)
Set of guild IDs where this command is registered (empty for global commands)
***
### handlerType
> `readonly` **handlerType**: `"slash"` = `"slash"`
Defined in: [handlers/SlashCommandHandler.ts:23](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L23)
## Methods
### addAttachmentOption()
> **addAttachmentOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:131](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L131)
Adds an attachment option.
#### Parameters
##### input
`SlashCommandAttachmentOption` \| ((`builder`) => `SlashCommandAttachmentOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addAttachmentOption`
***
### addAutocompleteHandler()
> **addAutocompleteHandler**(`handler`): `SlashCommandHandler`<`Context`>
Defined in: [handlers/SlashCommandHandler.ts:80](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L80)
Adds the autocomplete handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the autocomplete interaction
#### Returns
`SlashCommandHandler`<`Context`>
The current SlashCommandHandler instance
***
### addBooleanOption()
> **addBooleanOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:111](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L111)
Override option/subcommand adders so they return `this` (the handler),
preserving chaining when options/subcommands are added.
#### Parameters
##### input
`SlashCommandBooleanOption` \| ((`builder`) => `SlashCommandBooleanOption`)
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addBooleanOption`
***
### addChannelOption()
> **addChannelOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:121](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L121)
Adds a channel option.
#### Parameters
##### input
`SlashCommandChannelOption` \| ((`builder`) => `SlashCommandChannelOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addChannelOption`
***
### addGuildIds()
> **addGuildIds**(...`guildIds`): `this`
Defined in: [handlers/SlashCommandHandler.ts:46](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L46)
Adds one or more guild IDs to `guildIds`, making this a guild-scoped command.
#### Parameters
##### guildIds
...`string`[]
#### Returns
`this`
***
### addHandler()
> **addHandler**(`handler`): `SlashCommandHandler`<`Context`>
Defined in: [handlers/SlashCommandHandler.ts:67](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L67)
Adds the command handler function.
#### Parameters
##### handler
(`interaction`) => `any`
The function to handle the command interaction
#### Returns
`SlashCommandHandler`<`Context`>
The current SlashCommandHandler instance
***
### addIntegerOption()
> **addIntegerOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:150](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L150)
Adds an integer option.
#### Parameters
##### input
`SlashCommandIntegerOption` \| ((`builder`) => `SlashCommandIntegerOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addIntegerOption`
***
### addMentionableOption()
> **addMentionableOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:138](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L138)
Adds a mentionable option.
#### Parameters
##### input
`SlashCommandMentionableOption` \| ((`builder`) => `SlashCommandMentionableOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addMentionableOption`
***
### addNumberOption()
> **addNumberOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:155](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L155)
Adds a number option.
#### Parameters
##### input
`SlashCommandNumberOption` \| ((`builder`) => `SlashCommandNumberOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addNumberOption`
***
### addRoleOption()
> **addRoleOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:126](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L126)
Adds a role option.
#### Parameters
##### input
`SlashCommandRoleOption` \| ((`builder`) => `SlashCommandRoleOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addRoleOption`
***
### addStringOption()
> **addStringOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:145](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L145)
Adds a string option.
#### Parameters
##### input
`SlashCommandStringOption` \| ((`builder`) => `SlashCommandStringOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addStringOption`
***
### addSubcommand()
> **addSubcommand**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:160](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L160)
Adds a new subcommand to this command.
#### Parameters
##### input
`SlashCommandSubcommandBuilder` \| ((`sub`) => `SlashCommandSubcommandBuilder`)
A function that returns a subcommand builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addSubcommand`
***
### addSubcommandGroup()
> **addSubcommandGroup**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:167](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L167)
Adds a new subcommand group to this command.
#### Parameters
##### input
`SlashCommandSubcommandGroupBuilder` \| ((`group`) => `SlashCommandSubcommandGroupBuilder`)
A function that returns a subcommand group builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addSubcommandGroup`
***
### addUserOption()
> **addUserOption**(`input`): `this`
Defined in: [handlers/SlashCommandHandler.ts:116](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L116)
Adds a user option.
#### Parameters
##### input
`SlashCommandUserOption` \| ((`builder`) => `SlashCommandUserOption`)
A function that returns an option builder or an already built builder
#### Returns
`this`
#### Overrides
`SlashCommandBuilder.addUserOption`
***
### execute()
> **execute**(`interaction`): `Promise`<`void`>
Defined in: [handlers/SlashCommandHandler.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L90)
Executes the command handler
#### Parameters
##### interaction
[`ChatInputCommandInteraction`](/reference/classes/ChatInputCommandInteraction)<`Context`>
#### Returns
`Promise`<`void`>
***
### executeAutocomplete()
> **executeAutocomplete**(`interaction`): `Promise`<`void`>
Defined in: [handlers/SlashCommandHandler.ts:100](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L100)
Executes the autocomplete handler if it exists
#### Parameters
##### interaction
[`AutocompleteInteraction`](/reference/types/AutocompleteInteraction)<`Context`>
#### Returns
`Promise`<`void`>
***
### isGuildCommand()
> **isGuildCommand**(): `boolean`
Defined in: [handlers/SlashCommandHandler.ts:32](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L32)
Whether this command is registered per-guild (`true`) or globally (`false`, the default).
#### Returns
`boolean`
***
### removeGuildIds()
> **removeGuildIds**(...`guildIds`): `this`
Defined in: [handlers/SlashCommandHandler.ts:54](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L54)
Removes one or more guild IDs from `guildIds`.
#### Parameters
##### guildIds
...`string`[]
#### Returns
`this`
***
### setGuildIds()
> **setGuildIds**(`guildIds`): `this`
Defined in: [handlers/SlashCommandHandler.ts:37](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/SlashCommandHandler.ts#L37)
Replaces `guildIds` with the given list, making this a guild-scoped command.
#### Parameters
##### guildIds
`string`[]
#### Returns
`this`
# WebhookEventHandler
Defined in: [handlers/WebhookEventHandler.ts:18](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L18)
Represents a webhook event handler to be used by an Honocord instance or standalone fetch handler or Hono app.
## Type Parameters
### T
`T` *extends* `ApplicationWebhookEventType`
Discord webhook event type
### Env
`Env` *extends* `object` = {String.fromCharCode(123)} {String.fromCharCode(125)}
Environment bindings type
### Variables
`Variables` *extends* [`BlankVariables`](/reference/types/BlankVariables) = [`BlankVariables`](/reference/types/BlankVariables)
Additional context variables
### ForWorker
`ForWorker` *extends* `boolean` = `false`
Set to `true` for Cloudflare Workers mode (no return type required), `false` for standard mode (must return Response)
### Data
`Data` *extends* [`APIWebhookEventPayload`](/reference/types/APIWebhookEventPayload)<`T`> = [`APIWebhookEventPayload`](/reference/types/APIWebhookEventPayload)<`T`>
Typed webhook event data
## Constructors
### Constructor
> **new WebhookEventHandler**<`T`, `Env`, `Variables`, `ForWorker`, `Data`>(`eventType`, `forWorker?`): `WebhookEventHandler`<`T`, `Env`, `Variables`, `ForWorker`, `Data`>
Defined in: [handlers/WebhookEventHandler.ts:33](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L33)
#### Parameters
##### eventType
`T`
##### forWorker?
`ForWorker`
#### Returns
`WebhookEventHandler`<`T`, `Env`, `Variables`, `ForWorker`, `Data`>
## Properties
### eventType
> `readonly` **eventType**: `T`
Defined in: [handlers/WebhookEventHandler.ts:26](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L26)
***
### handlerType
> `readonly` **handlerType**: `"webhook"` = `"webhook"`
Defined in: [handlers/WebhookEventHandler.ts:25](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L25)
## Accessors
### fetch
#### Get Signature
> **get** **fetch**(): `ForWorker` *extends* `true` ? `never` : (`request`, `env?`, `executionCtx?`) => `Response` \| `Promise`<`Response`>
Defined in: [handlers/WebhookEventHandler.ts:201](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L201)
Returns the fetch handler for standalone usage.
**Note:** This method is only available in standard mode (`ForWorker = false`).
When using worker mode, this method returns `never` and will throw a runtime error.
**When to use:** Use this when you want a self-contained webhook endpoint that handles its own
Discord request verification and ping events, independent of a Honocord instance.
This is ideal for:
- Microservices architecture where webhooks are separate from interaction handlers
- Multiple bots with different webhook endpoints
- Testing individual webhook handlers in isolation
- Deploying webhooks on different paths or domains
##### Example
```typescript
import { Hono } from "hono";
import { WebhookEventHandler } from "honocord/handlers";
import { ApplicationWebhookEventType } from "discord-api-types/v10";
const app = new Hono();
// Standalone webhook handler with built-in verification
const messageHandler = new WebhookEventHandler(
ApplicationWebhookEventType.MessageCreate
);
messageHandler.addHandler(async (c) => {
const message = c.var.data;
return c.json({ received: true });
});
// Use as a standalone endpoint
app.post("/discord-webhook", messageHandler.fetch);
export default app;
```
##### Returns
`ForWorker` *extends* `true` ? `never` : (`request`, `env?`, `executionCtx?`) => `Response` \| `Promise`<`Response`>
A fetch-compatible handler function
## Methods
### addHandler()
> **addHandler**(`handlerFn`): `WebhookEventHandler`<`T`, `Env`, `Variables`, `ForWorker`, `Data`>
Defined in: [handlers/WebhookEventHandler.ts:109](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L109)
Registers the handler function for this webhook event.
#### Parameters
##### handlerFn
`ForWorker` *extends* `true` ? [`WebhookEventHandlerFnForWorkers`](/reference/types/WebhookEventHandlerFnForWorkers)<`Data`, `Env`, [`BlankVariables`](/reference/types/BlankVariables) & `object`> : [`WebhookEventHandlerFnWithRequest`](/reference/types/WebhookEventHandlerFnWithRequest)<`Data`, `Env`, [`BlankVariables`](/reference/types/BlankVariables) & `object`>
The function to execute when this webhook event is received
#### Returns
`WebhookEventHandler`<`T`, `Env`, `Variables`, `ForWorker`, `Data`>
#### Examples
Standard mode (must return Response):
```typescript
const handler = new WebhookEventHandler(ApplicationWebhookEventType.MessageCreate);
handler.addHandler(async (c) => {
const message = c.var.data;
console.log("Received message:", message.content);
return c.json({ success: true }); // Must return Response
});
```
Worker mode (no return required):
```typescript
const handler = new WebhookEventHandler(ApplicationWebhookEventType.MessageCreate, true);
handler.addHandler(async (c) => {
const message = c.var.data;
console.log("Received message:", message.content);
// No return required in worker mode
});
```
***
### execute()
> **execute**(`eventData`, `c`): `Promise`<`any`>
Defined in: [handlers/WebhookEventHandler.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L144)
Execute the handler with pre-verified event data.
**When to use:** This method is automatically called when the handler is registered with Honocord via `loadHandlers()`.
The Honocord instance handles request verification and ping events once, then delegates to this method.
**You typically don't call this directly** - it's used internally by Honocord's `webhookHandler`.
#### Parameters
##### eventData
`Data`
The pre-verified webhook event data
##### c
`Context`<{String.fromCharCode(123)} `Bindings`: `Env`; `Variables`: [`BlankVariables`](/reference/types/BlankVariables) & `object`; {String.fromCharCode(125)}>
The Hono context
#### Returns
`Promise`<`any`>
The response from the handler function
#### Example
```typescript
// This is handled automatically when using Honocord:
const bot = new Honocord();
const handler = new WebhookEventHandler(ApplicationWebhookEventType.MessageCreate);
handler.addHandler(async (c) => c.json({ ok: true }));
bot.loadHandlers(handler); // execute() is called internally
export default bot.getApp(); // POST /webhook
```
***
### getApp()
> **getApp**(): `ForWorker` *extends* `true` ? `never` : `Hono`<{String.fromCharCode(123)} `Bindings`: `Env`; `Variables`: `Omit`<`Variables`, `"data"`> & `object`; {String.fromCharCode(125)}, `BlankSchema`, `"/"`>
Defined in: [handlers/WebhookEventHandler.ts:244](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L244)
Returns the internal Hono app for standalone usage.
**Note:** This method is only available in standard mode (`ForWorker = false`).
When using worker mode, this method returns `never` and will throw a runtime error.
**When to use:** Similar to `fetch`, but allows you to mount the handler on a route prefix.
This provides the same self-contained verification as `fetch`.
#### Returns
`ForWorker` *extends* `true` ? `never` : `Hono`<{String.fromCharCode(123)} `Bindings`: `Env`; `Variables`: `Omit`<`Variables`, `"data"`> & `object`; {String.fromCharCode(125)}, `BlankSchema`, `"/"`>
A Hono app instance
#### Example
```typescript
import { Hono } from "hono";
import { WebhookEventHandler } from "honocord/handlers";
import { ApplicationWebhookEventType } from "discord-api-types/v10";
const app = new Hono();
const messageHandler = new WebhookEventHandler(
ApplicationWebhookEventType.MessageCreate
);
messageHandler.addHandler(async (c) => {
return c.json({ ok: true });
});
// Mount on a prefix
app.route("/discord", messageHandler.getApp());
// Available at POST /discord
export default app;
```
# parseCustomId
## Call Signature
> **parseCustomId**(`customId`, `onlyPrefix`): `string`
Defined in: [utils/index.ts:33](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/index.ts#L33)
Parse a custom ID string into its parts.
Supports two modes:
- onlyPrefix = true: returns the prefix string before the first '/' or '?'.
- onlyPrefix = false (default): returns an object with parsed pieces.
Expected customId shapes:
- "prefix/component/other/path?param1/param2"
- "prefix?param1/param2"
### Parameters
#### customId
`string`
The custom ID to parse.
#### onlyPrefix
`true`
If true, only return the prefix string (default: false).
### Returns
`string`
If onlyPrefix is true: string (the prefix). Otherwise an object with:
- compPath: string[] (full path split by '/'),
- prefix: string (first item of compPath),
- lastPathItem: string (last item of compPath),
- component: string | null (second item of compPath or null),
- params: string[] (params split by '/'; empty array when none),
- firstParam: string | null,
- lastParam: string | null
### Example
```ts
parseCustomId("modal/user/profile?123/abc")
// => { compPath: ["modal","user","profile"], prefix: "modal", ... params: ["123","abc"], ... }
parseCustomId("button/click", true)
// => "button"
```
## Call Signature
> **parseCustomId**(`customId`, `onlyPrefix?`): `object`
Defined in: [utils/index.ts:34](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/index.ts#L34)
Parse a custom ID string into its parts.
Supports two modes:
- onlyPrefix = true: returns the prefix string before the first '/' or '?'.
- onlyPrefix = false (default): returns an object with parsed pieces.
Expected customId shapes:
- "prefix/component/other/path?param1/param2"
- "prefix?param1/param2"
### Parameters
#### customId
`string`
The custom ID to parse.
#### onlyPrefix?
`false`
If true, only return the prefix string (default: false).
### Returns
`object`
If onlyPrefix is true: string (the prefix). Otherwise an object with:
- compPath: string[] (full path split by '/'),
- prefix: string (first item of compPath),
- lastPathItem: string (last item of compPath),
- component: string | null (second item of compPath or null),
- params: string[] (params split by '/'; empty array when none),
- firstParam: string | null,
- lastParam: string | null
#### component
> **component**: `string` \| `null`
#### compPath
> **compPath**: `string`[]
#### firstParam
> **firstParam**: `string` \| `null`
#### lastParam
> **lastParam**: `string` \| `null`
#### lastPathItem
> **lastPathItem**: `string`
#### params
> **params**: `string`[]
#### prefix
> **prefix**: `string`
### Example
```ts
parseCustomId("modal/user/profile?123/abc")
// => { compPath: ["modal","user","profile"], prefix: "modal", ... params: ["123","abc"], ... }
parseCustomId("button/click", true)
// => "button"
```
# registerCommands
> **registerCommands**(`token`, `applicationId`, ...`handlers`): `Promise`<`void`>
Defined in: [utils/registerCommands.ts:19](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/registerCommands.ts#L19)
Registers application commands (Slash and Context Menus) with Discord's API.
This function flattens the provided handlers, separates global from guild-specific
commands, and performs a bulk overwrite for both.
## Parameters
### token
`string` \| `undefined`
The Discord Bot token.
### applicationId
`string` \| `undefined`
The Discord Application ID.
### handlers
...[`FlatOrNestedArray`](/reference/types/FlatOrNestedArray)<[`AnyHandler`](/reference/types/AnyHandler)>
A rest parameter of handlers or arrays of handlers to register.
## Returns
`Promise`<`void`>
## Throws
If the API request to Discord fails.
# Colors
> **Colors**: [`Colors`](/reference/types/Colors)
Defined in: [utils/Colors.ts:2](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/utils/Colors.ts#L2)
# AnyHandler
> **AnyHandler** = [`Handler`](/reference/types/Handler)<`any`>
Defined in: [handlers/index.ts:48](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/index.ts#L48)
Helper type to allow handlers with any context extending BaseInteractionContext
# AnyInteraction
> **AnyInteraction**<`Context`> = [`ChatInputCommandInteraction`](/reference/classes/ChatInputCommandInteraction)<`Context`> \| [`UserContextInteraction`](/reference/types/UserContextInteraction)<`Context`> \| [`MessageContextInteraction`](/reference/types/MessageContextInteraction)<`Context`> \| [`TMessageComponentInteraction`](/reference/types/TMessageComponentInteraction)<`Context`> \| [`ModalInteraction`](/reference/classes/ModalInteraction)<`Context`> \| [`AutocompleteInteraction`](/reference/types/AutocompleteInteraction)<`Context`>
Defined in: [types/interactions.ts:50](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/interactions.ts#L50)
Union of every typed interaction class Honocord can construct from an incoming interaction.
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
# APIInteractionDataResolvedCollections
Defined in: [types/interactions.ts:33](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/interactions.ts#L33)
Collections of resolved data from Discord API interactions.
When users or roles are mentioned in command options, Discord resolves them and provides
the full data in these collections for easy access.
## Properties
### attachments?
> `optional` **attachments?**: `Collection`<`string`, `APIAttachment`>
Defined in: [types/interactions.ts:43](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/interactions.ts#L43)
Map of attachment IDs to attachment objects
***
### channels?
> `optional` **channels?**: `Collection`<`string`, `APIInteractionDataResolvedChannel`>
Defined in: [types/interactions.ts:41](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/interactions.ts#L41)
Map of channel IDs to channel objects
***
### members?
> `optional` **members?**: `Collection`<`string`, [`ResolvedSelectedGuildMember`](/reference/types/ResolvedSelectedGuildMember)>
Defined in: [types/interactions.ts:39](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/interactions.ts#L39)
Map of user IDs to guild member objects
***
### roles?
> `optional` **roles?**: `Collection`<`string`, `APIRole`>
Defined in: [types/interactions.ts:37](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/interactions.ts#L37)
Map of role IDs to role objects
***
### users?
> `optional` **users?**: `Collection`<`string`, `APIUser`>
Defined in: [types/interactions.ts:35](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/interactions.ts#L35)
Map of user IDs to user objects
# APIModalData
> **APIModalData** = [`TextInputModalData`](/reference/types/TextInputModalData) \| [`SelectMenuModalData`](/reference/types/SelectMenuModalData) \| `APIModalSubmitCheckboxComponent` \| `APIModalSubmitCheckboxGroupComponent` \| `APIModalSubmitRadioGroupComponent` \| `APIModalSubmitFileUploadComponent`
Defined in: [resolvers/ModalComponentResolver.ts:53](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L53)
Union of every resolved modal component data shape returned by `ModalComponentResolver`.
# APIWebhookEventPayload
> **APIWebhookEventPayload**<`T`> = `Extract`<`APIWebhookEventBody`, {String.fromCharCode(123)} `type`: `T`; {String.fromCharCode(125)}>
Defined in: [types/webhook.ts:8](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/webhook.ts#L8)
The raw Discord webhook event body, narrowed to a specific event type `T`.
## Type Parameters
### T
`T` *extends* `ApplicationWebhookEventType` = `ApplicationWebhookEventType`
# AttachmentData
Defined in: [types/responses.ts:81](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L81)
Metadata for an `AttachmentBuilder`, passed as its constructor's second argument.
## Properties
### contentType?
> `optional` **contentType?**: `string`
Defined in: [types/responses.ts:84](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L84)
***
### description?
> `optional` **description?**: `string`
Defined in: [types/responses.ts:83](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L83)
***
### key?
> `optional` **key?**: `string`
Defined in: [types/responses.ts:85](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L85)
***
### name?
> `optional` **name?**: `string`
Defined in: [types/responses.ts:82](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L82)
# AttachmentMetadata
Defined in: [types/responses.ts:73](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L73)
The JSON metadata object placed in the attachments[] array
## Properties
### description?
> `optional` **description?**: `string`
Defined in: [types/responses.ts:77](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L77)
***
### filename
> **filename**: `string`
Defined in: [types/responses.ts:76](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L76)
***
### id
> **id**: `string` \| `number`
Defined in: [types/responses.ts:75](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/responses.ts#L75)
Matches the index n in files[n], or a custom snowflake
# AttachmentPayload
Defined in: [types/utils.ts:23](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L23)
Plain object shape accepted by `AttachmentBuilder.from` as an alternative to an existing builder.
## Properties
### attachment
> **attachment**: `Stream` \| [`BufferResolvable`](/reference/types/BufferResolvable)
Defined in: [types/utils.ts:24](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L24)
***
### description?
> `optional` **description?**: `string`
Defined in: [types/utils.ts:25](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L25)
***
### duration?
> `optional` **duration?**: `number`
Defined in: [types/utils.ts:26](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L26)
***
### name?
> `optional` **name?**: `string`
Defined in: [types/utils.ts:27](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L27)
***
### title?
> `optional` **title?**: `string`
Defined in: [types/utils.ts:28](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L28)
***
### waveform?
> `optional` **waveform?**: `string`
Defined in: [types/utils.ts:29](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L29)
# AutocompleteFocusedOption
> **AutocompleteFocusedOption** = `object`
Defined in: [resolvers/CommandOptionResolver.ts:16](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L16)
The currently-focused option during an autocomplete request, as returned by `getFocused`.
## Properties
### focused
> **focused**: `boolean`
Defined in: [resolvers/CommandOptionResolver.ts:32](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L32)
Whether the option is focused.
***
### name
> **name**: `string`
Defined in: [resolvers/CommandOptionResolver.ts:20](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L20)
The name of the option.
***
### type
> **type**: `ApplicationCommandOptionType`
Defined in: [resolvers/CommandOptionResolver.ts:24](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L24)
The type of the application command option.
***
### value
> **value**: `string`
Defined in: [resolvers/CommandOptionResolver.ts:28](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/CommandOptionResolver.ts#L28)
The value of the option.
# AutocompleteInteraction
Defined in: [interactions/AutocompleteInteraction.ts:13](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/AutocompleteInteraction.ts#L13)
An autocomplete request for a slash command option. Passed to `SlashCommandHandler.executeAutocomplete`.
## Extends
- [`BaseInteraction`](/reference/classes/BaseInteraction)<`InteractionType.ApplicationCommandAutocomplete`, `Context`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Properties
### \_ephemeral
> `protected` **\_ephemeral**: `boolean` \| `null` = `null`
Defined in: [interactions/BaseInteraction.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L93)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`_ephemeral`](/reference/classes/BaseInteraction#_ephemeral)
***
### api
> `protected` **api**: `API`
Defined in: [interactions/BaseInteraction.ts:102](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L102)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`api`](/reference/classes/BaseInteraction#api)
***
### context
> `readonly` **context**: `Context`
Defined in: [interactions/BaseInteraction.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L97)
The Hono interaction context this interaction was created from.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`context`](/reference/classes/BaseInteraction#context-1)
***
### deferred
> `protected` **deferred**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:95](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L95)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferred`](/reference/classes/BaseInteraction#deferred)
***
### fetcher
> `readonly` **fetcher**: [`Fetcher`](/reference/classes/Fetcher)
Defined in: [interactions/BaseInteraction.ts:99](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L99)
Cache-aware fetcher for resolving Discord entities referenced by this interaction.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`fetcher`](/reference/classes/BaseInteraction#fetcher)
***
### options
> `readonly` **options**: [`CommandInteractionOptionResolver`](/reference/classes/CommandInteractionOptionResolver)
Defined in: [interactions/AutocompleteInteraction.ts:18](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/AutocompleteInteraction.ts#L18)
Resolver for reading the command's option values, including the currently-focused option.
***
### raw
> `protected` `readonly` **raw**: `APIApplicationCommandAutocompleteInteraction`
Defined in: [interactions/BaseInteraction.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L90)
The raw interaction data
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`raw`](/reference/classes/BaseInteraction#raw)
***
### replied
> `protected` **replied**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L94)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`replied`](/reference/classes/BaseInteraction#replied)
***
### responded
> **responded**: `boolean` = `false`
Defined in: [interactions/AutocompleteInteraction.ts:20](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/AutocompleteInteraction.ts#L20)
Whether `respond` has already been called for this interaction.
***
### rest
> `readonly` **rest**: `REST`
Defined in: [interactions/BaseInteraction.ts:92](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L92)
REST client used to make requests to the Discord API.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`rest`](/reference/classes/BaseInteraction#rest)
***
### type
> `readonly` **type**: `ApplicationCommandAutocomplete`
Defined in: [interactions/BaseInteraction.ts:88](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L88)
The interaction's Discord interaction type.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`type`](/reference/classes/BaseInteraction#type-1)
## Accessors
### applicationId
#### Get Signature
> **get** **applicationId**(): `string`
Defined in: [interactions/BaseInteraction.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L114)
The ID of the application this interaction was sent to.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`applicationId`](/reference/classes/BaseInteraction#applicationid)
***
### appPermissions
#### Get Signature
> **get** **appPermissions**(): `string`
Defined in: [interactions/BaseInteraction.ts:179](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L179)
Bitwise set of permissions the app has in the source location of the interaction.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`appPermissions`](/reference/classes/BaseInteraction#apppermissions)
***
### channel
#### Get Signature
> **get** **channel**(): `Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L129)
The partial channel object the interaction was sent from, if any. Not cached — see [Honocord](/reference/classes/Honocord)'s runtime notes.
##### Returns
`Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`channel`](/reference/classes/BaseInteraction#channel)
***
### channelId
#### Get Signature
> **get** **channelId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:124](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L124)
The ID of the channel the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`channelId`](/reference/classes/BaseInteraction#channelid)
***
### commandId
#### Get Signature
> **get** **commandId**(): `string`
Defined in: [interactions/AutocompleteInteraction.ts:33](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/AutocompleteInteraction.ts#L33)
The invoked command's ID.
##### Returns
`string`
***
### commandName
#### Get Signature
> **get** **commandName**(): `string`
Defined in: [interactions/AutocompleteInteraction.ts:28](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/AutocompleteInteraction.ts#L28)
The invoked command's name.
##### Returns
`string`
***
### entitlements
#### Get Signature
> **get** **entitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:119](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L119)
Entitlements for the invoking user, for monetized apps.
##### Returns
`APIEntitlement`[]
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`entitlements`](/reference/classes/BaseInteraction#entitlements)
***
### guild
#### Get Signature
> **get** **guild**(): `APIPartialInteractionGuild` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:139](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L139)
The partial guild object the interaction was sent from, if any. Not cached.
##### Returns
`APIPartialInteractionGuild` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guild`](/reference/classes/BaseInteraction#guild)
***
### guildId
#### Get Signature
> **get** **guildId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:134](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L134)
The ID of the guild the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildId`](/reference/classes/BaseInteraction#guildid)
***
### guildLocale
#### Get Signature
> **get** **guildLocale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:164](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L164)
The guild's locale, if sent from a guild.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildLocale`](/reference/classes/BaseInteraction#guildlocale)
***
### id
#### Get Signature
> **get** **id**(): `string`
Defined in: [interactions/BaseInteraction.ts:174](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L174)
The interaction's ID.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`id`](/reference/classes/BaseInteraction#id)
***
### locale
#### Get Signature
> **get** **locale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:159](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L159)
The invoking user's locale.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`locale`](/reference/classes/BaseInteraction#locale)
***
### member
#### Get Signature
> **get** **member**(): `APIInteractionGuildMember` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:154](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L154)
The guild member who triggered the interaction, if sent from a guild.
##### Returns
`APIInteractionGuildMember` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`member`](/reference/classes/BaseInteraction#member)
***
### token
#### Get Signature
> **get** **token**(): `string`
Defined in: [interactions/BaseInteraction.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L169)
The interaction token, used to send/edit/delete responses.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`token`](/reference/classes/BaseInteraction#token)
***
### user
#### Get Signature
> **get** **user**(): `APIUser`
Defined in: [interactions/BaseInteraction.ts:149](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L149)
The user who triggered the interaction (resolved from `member.user` in guilds, `user` in DMs).
##### Returns
`APIUser`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`user`](/reference/classes/BaseInteraction#user)
***
### userId
#### Get Signature
> **get** **userId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L144)
The ID of the user who triggered the interaction.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`userId`](/reference/classes/BaseInteraction#userid)
***
### version
#### Get Signature
> **get** **version**(): `1`
Defined in: [interactions/BaseInteraction.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L184)
Discord's interaction payload version (always `1`).
##### Returns
`1`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`version`](/reference/classes/BaseInteraction#version)
## Methods
### deferReply()
> **deferReply**(`forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L296)
Acknowledges the interaction without sending an initial response, showing a "thinking" state.
Use `editReply` afterwards to send the actual response, within the 15-minute interaction token lifetime.
#### Parameters
##### forceEphemeral?
`boolean` = `true`
Whether the eventual response should be ephemeral. Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferReply`](/reference/classes/BaseInteraction#deferreply)
***
### deferUpdate()
> **deferUpdate**(): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:321](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L321)
Defers the update of a component interaction.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
A promise that resolves when the update is deferred
Responding to a component interaction via the deferUpdate() method acknowledges the interaction and resets the message state.
This method can be used to suppress the need for further responses, however it's encouraged to provide meaningful feedback to users via an update() or ephemeral reply() at least.\
Once deferUpdate() has been called, future messages can be sent by calling followUp() or edits can be made by calling editReply() on the component interaction.
Example flow:
1. User clicks a button.
2. Bot calls `deferUpdate()` to acknowledge the interaction.
3. Bot performs some processing.
4. Bot calls `editReply()` to update the original message.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferUpdate`](/reference/classes/BaseInteraction#deferupdate)
***
### deleteReply()
> **deleteReply**(`messageId?`): `Promise`<`void`>
Defined in: [interactions/BaseInteraction.ts:359](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L359)
Deletes the original interaction response (or a follow-up message).
#### Parameters
##### messageId?
`string`
The message id to delete, defaults to `@original`
#### Returns
`Promise`<`void`>
A promise that resolves when the message is deleted
This is used to delete the original interaction response message or a follow-up message.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deleteReply`](/reference/classes/BaseInteraction#deletereply)
***
### editReply()
> **editReply**(`options`, `messageId?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:336](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L336)
Edits the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to edit the message with
##### messageId?
`string` = `"@original"`
The message id to edit, defaults to `@original`
#### Returns
`Promise`<`APIMessage`>
The edited message
This is used to edit the original interaction response message.
Before using this method, the interaction needs to be replied to first before using this method - with `reply`, `deferReply` or `update`.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`editReply`](/reference/classes/BaseInteraction#editreply)
***
### followUp()
> **followUp**(`options`, `forceEphemeral?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:397](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L397)
Sends a follow-up message to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to send the follow-up message with
##### forceEphemeral?
`boolean` = `false`
Whether to force the message to be ephemeral
#### Returns
`Promise`<`APIMessage`>
The sent follow-up message
This is used to send additional messages after the initial interaction response.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`followUp`](/reference/classes/BaseInteraction#followup)
***
### getAppEntitlements()
> **getAppEntitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:207](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L207)
Returns entitlements belonging to this interaction's application.
#### Returns
`APIEntitlement`[]
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`getAppEntitlements`](/reference/classes/BaseInteraction#getappentitlements)
***
### guildHavePremium()
> **guildHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:212](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L212)
Whether the guild this interaction was sent from currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildHavePremium`](/reference/classes/BaseInteraction#guildhavepremium)
***
### inDM()
> **inDM**(): `this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
Defined in: [interactions/BaseInteraction.ts:202](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L202)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to `undefined` when the interaction was sent from a DM.
#### Returns
`this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`inDM`](/reference/classes/BaseInteraction#indm)
***
### inGuild()
> **inGuild**(): `this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
Defined in: [interactions/BaseInteraction.ts:197](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L197)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to defined when the interaction was sent from a guild.
#### Returns
`this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`inGuild`](/reference/classes/BaseInteraction#inguild)
***
### isAutocomplete()
> **isAutocomplete**(): `this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
Defined in: [interactions/BaseInteraction.ts:490](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L490)
Type guard: whether this is an autocomplete request for a slash command option.
#### Returns
`this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isAutocomplete`](/reference/classes/BaseInteraction#isautocomplete)
***
### isButton()
> **isButton**(): `this is ButtonInteraction`
Defined in: [interactions/BaseInteraction.ts:460](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L460)
Type guard: whether this is a button click interaction.
#### Returns
`this is ButtonInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isButton`](/reference/classes/BaseInteraction#isbutton)
***
### isChannelSelect()
> **isChannelSelect**(): `this is ChannelSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:485](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L485)
Type guard: whether this is a channel select menu interaction.
#### Returns
`this is ChannelSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isChannelSelect`](/reference/classes/BaseInteraction#ischannelselect)
***
### isChatInputCommand()
> **isChatInputCommand**(): `this is ChatInputCommandInteraction`
Defined in: [interactions/BaseInteraction.ts:421](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L421)
Type guard: whether this is a chat input (slash) command interaction.
#### Returns
`this is ChatInputCommandInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isChatInputCommand`](/reference/classes/BaseInteraction#ischatinputcommand)
***
### isCommand()
> **isCommand**(): `this is CommandInteraction`
Defined in: [interactions/BaseInteraction.ts:416](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L416)
Type guard: whether this is an application command interaction (slash command or context menu command).
#### Returns
`this is CommandInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isCommand`](/reference/classes/BaseInteraction#iscommand)
***
### isJSONEncodable()
> `protected` **isJSONEncodable**(`obj`): `obj is JSONEncodable`
Defined in: [interactions/BaseInteraction.ts:188](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L188)
#### Parameters
##### obj
`unknown`
#### Returns
`obj is JSONEncodable`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isJSONEncodable`](/reference/classes/BaseInteraction#isjsonencodable)
***
### isMentionableSelect()
> **isMentionableSelect**(): `this is MentionableSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:480](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L480)
Type guard: whether this is a mentionable (user + role) select menu interaction.
#### Returns
`this is MentionableSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMentionableSelect`](/reference/classes/BaseInteraction#ismentionableselect)
***
### isMessageComponent()
> **isMessageComponent**(): `this is MessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:455](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L455)
Type guard: whether this is a message component interaction (button or select menu).
#### Returns
`this is MessageComponentInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMessageComponent`](/reference/classes/BaseInteraction#ismessagecomponent)
***
### isMessageContextCommand()
> **isMessageContextCommand**(): `this is MessageContextInteraction`
Defined in: [interactions/BaseInteraction.ts:437](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L437)
Type guard: whether this is a message context menu command interaction.
#### Returns
`this is MessageContextInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMessageContextCommand`](/reference/classes/BaseInteraction#ismessagecontextcommand)
***
### isMessageModal()
> **isMessageModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:450](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L450)
Type guard: whether this is a modal submit interaction that opened from a message (not a slash command).
#### Returns
`this is ModalInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isMessageModal`](/reference/classes/BaseInteraction#ismessagemodal)
***
### isModal()
> **isModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:445](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L445)
Type guard: whether this is a modal submit interaction.
#### Returns
`this is ModalInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isModal`](/reference/classes/BaseInteraction#ismodal)
***
### isRoleSelect()
> **isRoleSelect**(): `this is RoleSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:475](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L475)
Type guard: whether this is a role select menu interaction.
#### Returns
`this is RoleSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isRoleSelect`](/reference/classes/BaseInteraction#isroleselect)
***
### isStringSelect()
> **isStringSelect**(): `this is StringSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:465](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L465)
Type guard: whether this is a string select menu interaction.
#### Returns
`this is StringSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isStringSelect`](/reference/classes/BaseInteraction#isstringselect)
***
### isUserContextCommand()
> **isUserContextCommand**(): `this is UserContextInteraction`
Defined in: [interactions/BaseInteraction.ts:429](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L429)
Type guard: whether this is a user context menu command interaction.
#### Returns
`this is UserContextInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isUserContextCommand`](/reference/classes/BaseInteraction#isusercontextcommand)
***
### isUserSelect()
> **isUserSelect**(): `this is UserSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:470](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L470)
Type guard: whether this is a user select menu interaction.
#### Returns
`this is UserSelectInteraction`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`isUserSelect`](/reference/classes/BaseInteraction#isuserselect)
***
### reply()
> **reply**(`options`, `forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:273](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L273)
Sends the initial response to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The message content, or a string shorthand for `{ content: options }`
##### forceEphemeral?
`boolean` = `true`
Whether to force the response to be ephemeral (visible only to the invoking user). Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The created interaction response, including the created message.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`reply`](/reference/classes/BaseInteraction#reply)
***
### respond()
> **respond**(`choices`): `Promise`<`void`>
Defined in: [interactions/AutocompleteInteraction.ts:42](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/AutocompleteInteraction.ts#L42)
Sends autocomplete choices back to Discord.
#### Parameters
##### choices
`APIApplicationCommandOptionChoice`<`string` \| `number`>[]
Up to 25 choices to display to the user.
#### Returns
`Promise`<`void`>
***
### toSnakeCase()
> `protected` **toSnakeCase**<`T`>(`obj`): `T`
Defined in: [interactions/BaseInteraction.ts:192](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L192)
#### Type Parameters
##### T
`T` = `unknown`
#### Parameters
##### obj
`unknown`
#### Returns
`T`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`toSnakeCase`](/reference/classes/BaseInteraction#tosnakecase)
***
### update()
> **update**(`options`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:374](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L374)
Updates the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to update the message with
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The updated message
This is mainly used for component interactions where you want to update the message the component is attached to OR for
moodal submit interactions to update the message that opened the modal.
After calling this method, the interaction is considered replied and you need to use `editReply` to edit the original response.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`update`](/reference/classes/BaseInteraction#update)
***
### userHavePremium()
> **userHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:222](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L222)
Whether the user who triggered this interaction currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`userHavePremium`](/reference/classes/BaseInteraction#userhavepremium)
# BaseHonocordEnv
Defined in: [types/context.ts:32](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L32)
Base context environment
## Type Parameters
### TBindings
`TBindings` *extends* `Bindings` = `any`
### TVariables
`TVariables` *extends* `Variables` = `any`
## Properties
### Bindings
> **Bindings**: `TBindings`
Defined in: [types/context.ts:36](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L36)
Bindings available in the environment (from the worker)
***
### Variables
> **Variables**: [`BaseVariables`](/reference/types/BaseVariables) & `TVariables`
Defined in: [types/context.ts:40](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L40)
Variables available in the context (from Hono + Honocord)
# BaseInteractionContext
> **BaseInteractionContext**<`TBindings`, `TVariables`, `TPath`> = `Context`<{String.fromCharCode(123)} `Bindings`: `TBindings`; `Variables`: `TVariables` & [`BaseVariables`](/reference/types/BaseVariables); {String.fromCharCode(125)}, `TPath`, `any`>
Defined in: [types/context.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L94)
Generic context type that users can extend for type-safe access to environment bindings and variables.
## Type Parameters
### TBindings
`TBindings` *extends* `Bindings` = `any`
Custom environment bindings (e.g., Cloudflare Workers env)
### TVariables
`TVariables` *extends* `Variables` = `any`
Custom Hono variables
### TPath
`TPath` *extends* `string` = `"/"`
The path type for the context
## Example
```ts
// types.ts
import type { BaseHonocordEnv, BaseInteractionContext } from "honocord";
// Define your custom environment
import type { BaseHonocordEnv, BaseInteractionContext } from "honocord";
// Define your custom environment bindings (e.g., Cloudflare Workers env)
export interface MyEnv {
DISCORD_TOKEN: string;
DISCORD_PUBLIC_KEY: string;
DATABASE: D1Database; // Example Cloudflare D1
}
// Define your custom Hono variables (can be populated by middleware)
export interface MyVariables {
user_id: string;
is_admin: boolean;
}
// Create a reusable context type
export type MyContext = BaseInteractionContext;
// index.ts
import { Honocord, SlashCommandHandler } from "honocord";
import type { MyContext } from "./types";
const bot = new Honocord();
const command = new SlashCommandHandler()
.setName("query")
.setDescription("Query the database");
command.addHandler(async (interaction: MyContext) => {
// Type-safe access to your environment
const db = interaction.env.DATABASE;
const result = await db.prepare("SELECT * FROM users").all();
await interaction.reply(`Found ${result.results.length} users`);
});
bot.loadHandlers([command]);
```
# BaseModalData
Defined in: [resolvers/ModalComponentResolver.ts:21](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L21)
Base shape shared by every resolved modal component's data.
## Extended by
- [`TextInputModalData`](/reference/types/TextInputModalData)
- [`SelectMenuModalData`](/reference/types/SelectMenuModalData)
## Type Parameters
### Type
`Type` *extends* `ComponentType`
## Properties
### id?
> `optional` **id?**: `number`
Defined in: [resolvers/ModalComponentResolver.ts:22](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L22)
***
### type
> **type**: `Type`
Defined in: [resolvers/ModalComponentResolver.ts:23](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/resolvers/ModalComponentResolver.ts#L23)
# BaseVariables
Defined in: [types/context.ts:11](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L11)
Base variables that the library uses
## Properties
### autocomplete?
> `optional` **autocomplete?**: [`ChatInputCommandInteraction`](/reference/classes/ChatInputCommandInteraction)<[`BaseInteractionContext`](/reference/types/BaseInteractionContext)>
Defined in: [types/context.ts:13](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L13)
Set for the duration of an autocomplete request. Access via `c.var.autocomplete`.
***
### cache
> **cache**: [`CacheManager`](/reference/classes/CacheManager)
Defined in: [types/context.ts:26](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L26)
The cache manager for this context, if available. This will be populated by the library if a cache adapter is provided in the environment.
It is always given, but if no cache adapter is provided, it will be using the `NullCacheAdapter`
which does not actually cache anything and always returns `null` for `get` and `false` for `has`.
***
### command?
> `optional` **command?**: [`ChatInputCommandInteraction`](/reference/classes/ChatInputCommandInteraction)<[`BaseInteractionContext`](/reference/types/BaseInteractionContext)>
Defined in: [types/context.ts:15](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L15)
Set for the duration of a slash command interaction. Access via `c.var.command`.
***
### component?
> `optional` **component?**: [`TMessageComponentInteraction`](/reference/types/TMessageComponentInteraction)
Defined in: [types/context.ts:19](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L19)
Set for the duration of a message component interaction. Access via `c.var.component`.
***
### modal?
> `optional` **modal?**: [`ModalInteraction`](/reference/classes/ModalInteraction)<[`BaseInteractionContext`](/reference/types/BaseInteractionContext)>
Defined in: [types/context.ts:17](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/context.ts#L17)
Set for the duration of a modal submit interaction. Access via `c.var.modal`.
# BlankVariables
> **BlankVariables** = `Record`<`string`, `any`>
Defined in: [handlers/WebhookEventHandler.ts:7](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/handlers/WebhookEventHandler.ts#L7)
Default (empty) Hono variables type used by `WebhookEventHandler` when no `Variables` type parameter is given.
# BufferResolvable
> **BufferResolvable** = `Buffer` \| `string`
Defined in: [types/utils.ts:20](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L20)
A value resolvable to file content — either an already-read `Buffer` or a file path string.
# BufferSource
> **BufferSource** = `ArrayBufferView` \| `ArrayBuffer`
Defined in: [types/utils.ts:4](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/utils.ts#L4)
A binary source usable wherever the platform accepts raw buffer-like data.
# ButtonInteraction
Defined in: [interactions/ButtonInteraction.ts:7](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ButtonInteraction.ts#L7)
A button click interaction. Passed to a `ComponentHandler` registered for `ComponentType.Button`.
## Extends
- [`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction)<`Context`, `ComponentType.Button`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Properties
### \_ephemeral
> `protected` **\_ephemeral**: `boolean` \| `null` = `null`
Defined in: [interactions/BaseInteraction.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L93)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`_ephemeral`](/reference/classes/BaseInteraction#_ephemeral)
***
### api
> `protected` **api**: `API`
Defined in: [interactions/BaseInteraction.ts:102](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L102)
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`api`](/reference/classes/MessageComponentInteraction#api)
***
### componentType
> `readonly` **componentType**: `Button`
Defined in: [interactions/MessageComponentInteraction.ts:19](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L19)
The message component's type (button, string select, etc).
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`componentType`](/reference/classes/MessageComponentInteraction#componenttype)
***
### context
> `readonly` **context**: `Context`
Defined in: [interactions/BaseInteraction.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L97)
The Hono interaction context this interaction was created from.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`context`](/reference/classes/MessageComponentInteraction#context-1)
***
### customId
> `readonly` **customId**: `string`
Defined in: [interactions/MessageComponentInteraction.ts:17](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L17)
The component's custom ID, as set when it was built. See the [Custom ID System](/docs/custom-id-system) guide.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`customId`](/reference/classes/MessageComponentInteraction#customid)
***
### deferred
> `protected` **deferred**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:95](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L95)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`deferred`](/reference/classes/BaseInteraction#deferred)
***
### fetcher
> `readonly` **fetcher**: [`Fetcher`](/reference/classes/Fetcher)
Defined in: [interactions/BaseInteraction.ts:99](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L99)
Cache-aware fetcher for resolving Discord entities referenced by this interaction.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`fetcher`](/reference/classes/BaseInteraction#fetcher)
***
### message
> `readonly` **message**: `APIMessage`
Defined in: [interactions/MessageComponentInteraction.ts:15](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L15)
The message the component is attached to.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`message`](/reference/classes/MessageComponentInteraction#message)
***
### raw
> `protected` `readonly` **raw**: `APIMessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L90)
The raw interaction data
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`raw`](/reference/classes/MessageComponentInteraction#raw)
***
### replied
> `protected` **replied**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L94)
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`replied`](/reference/classes/BaseInteraction#replied)
***
### rest
> `readonly` **rest**: `REST`
Defined in: [interactions/BaseInteraction.ts:92](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L92)
REST client used to make requests to the Discord API.
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`rest`](/reference/classes/BaseInteraction#rest)
***
### type
> `readonly` **type**: `MessageComponent`
Defined in: [interactions/BaseInteraction.ts:88](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L88)
The interaction's Discord interaction type.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`type`](/reference/classes/MessageComponentInteraction#type)
## Accessors
### applicationId
#### Get Signature
> **get** **applicationId**(): `string`
Defined in: [interactions/BaseInteraction.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L114)
The ID of the application this interaction was sent to.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`applicationId`](/reference/classes/BaseInteraction#applicationid)
***
### appPermissions
#### Get Signature
> **get** **appPermissions**(): `string`
Defined in: [interactions/BaseInteraction.ts:179](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L179)
Bitwise set of permissions the app has in the source location of the interaction.
##### Returns
`string`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`appPermissions`](/reference/classes/BaseInteraction#apppermissions)
***
### channel
#### Get Signature
> **get** **channel**(): `Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L129)
The partial channel object the interaction was sent from, if any. Not cached — see [Honocord](/reference/classes/Honocord)'s runtime notes.
##### Returns
`Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`channel`](/reference/classes/MessageComponentInteraction#channel)
***
### channelId
#### Get Signature
> **get** **channelId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:124](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L124)
The ID of the channel the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`channelId`](/reference/classes/BaseInteraction#channelid)
***
### entitlements
#### Get Signature
> **get** **entitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:119](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L119)
Entitlements for the invoking user, for monetized apps.
##### Returns
`APIEntitlement`[]
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`entitlements`](/reference/classes/BaseInteraction#entitlements)
***
### guild
#### Get Signature
> **get** **guild**(): `APIPartialInteractionGuild` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:139](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L139)
The partial guild object the interaction was sent from, if any. Not cached.
##### Returns
`APIPartialInteractionGuild` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guild`](/reference/classes/BaseInteraction#guild)
***
### guildId
#### Get Signature
> **get** **guildId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:134](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L134)
The ID of the guild the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildId`](/reference/classes/BaseInteraction#guildid)
***
### guildLocale
#### Get Signature
> **get** **guildLocale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:164](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L164)
The guild's locale, if sent from a guild.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`guildLocale`](/reference/classes/BaseInteraction#guildlocale)
***
### id
#### Get Signature
> **get** **id**(): `string`
Defined in: [interactions/BaseInteraction.ts:174](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L174)
The interaction's ID.
##### Returns
`string`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`id`](/reference/classes/MessageComponentInteraction#id)
***
### locale
#### Get Signature
> **get** **locale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:159](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L159)
The invoking user's locale.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`locale`](/reference/classes/BaseInteraction#locale)
***
### member
#### Get Signature
> **get** **member**(): `APIInteractionGuildMember` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:154](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L154)
The guild member who triggered the interaction, if sent from a guild.
##### Returns
`APIInteractionGuildMember` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`member`](/reference/classes/BaseInteraction#member)
***
### token
#### Get Signature
> **get** **token**(): `string`
Defined in: [interactions/BaseInteraction.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L169)
The interaction token, used to send/edit/delete responses.
##### Returns
`string`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`token`](/reference/classes/MessageComponentInteraction#token)
***
### user
#### Get Signature
> **get** **user**(): `APIUser`
Defined in: [interactions/BaseInteraction.ts:149](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L149)
The user who triggered the interaction (resolved from `member.user` in guilds, `user` in DMs).
##### Returns
`APIUser`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`user`](/reference/classes/BaseInteraction#user)
***
### userId
#### Get Signature
> **get** **userId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L144)
The ID of the user who triggered the interaction.
##### Returns
`string` \| `undefined`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`userId`](/reference/classes/BaseInteraction#userid)
***
### version
#### Get Signature
> **get** **version**(): `1`
Defined in: [interactions/BaseInteraction.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L184)
Discord's interaction payload version (always `1`).
##### Returns
`1`
#### Inherited from
[`BaseInteraction`](/reference/classes/BaseInteraction).[`version`](/reference/classes/BaseInteraction#version)
## Methods
### deferReply()
> **deferReply**(`forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L296)
Acknowledges the interaction without sending an initial response, showing a "thinking" state.
Use `editReply` afterwards to send the actual response, within the 15-minute interaction token lifetime.
#### Parameters
##### forceEphemeral?
`boolean` = `true`
Whether the eventual response should be ephemeral. Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`deferReply`](/reference/classes/MessageComponentInteraction#deferreply)
***
### deferUpdate()
> **deferUpdate**(): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:321](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L321)
Defers the update of a component interaction.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
A promise that resolves when the update is deferred
Responding to a component interaction via the deferUpdate() method acknowledges the interaction and resets the message state.
This method can be used to suppress the need for further responses, however it's encouraged to provide meaningful feedback to users via an update() or ephemeral reply() at least.\
Once deferUpdate() has been called, future messages can be sent by calling followUp() or edits can be made by calling editReply() on the component interaction.
Example flow:
1. User clicks a button.
2. Bot calls `deferUpdate()` to acknowledge the interaction.
3. Bot performs some processing.
4. Bot calls `editReply()` to update the original message.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`deferUpdate`](/reference/classes/MessageComponentInteraction#deferupdate)
***
### deleteReply()
> **deleteReply**(`messageId?`): `Promise`<`void`>
Defined in: [interactions/BaseInteraction.ts:359](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L359)
Deletes the original interaction response (or a follow-up message).
#### Parameters
##### messageId?
`string`
The message id to delete, defaults to `@original`
#### Returns
`Promise`<`void`>
A promise that resolves when the message is deleted
This is used to delete the original interaction response message or a follow-up message.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`deleteReply`](/reference/classes/MessageComponentInteraction#deletereply)
***
### editReply()
> **editReply**(`options`, `messageId?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:336](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L336)
Edits the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to edit the message with
##### messageId?
`string` = `"@original"`
The message id to edit, defaults to `@original`
#### Returns
`Promise`<`APIMessage`>
The edited message
This is used to edit the original interaction response message.
Before using this method, the interaction needs to be replied to first before using this method - with `reply`, `deferReply` or `update`.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`editReply`](/reference/classes/MessageComponentInteraction#editreply)
***
### followUp()
> **followUp**(`options`, `forceEphemeral?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:397](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L397)
Sends a follow-up message to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to send the follow-up message with
##### forceEphemeral?
`boolean` = `false`
Whether to force the message to be ephemeral
#### Returns
`Promise`<`APIMessage`>
The sent follow-up message
This is used to send additional messages after the initial interaction response.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`followUp`](/reference/classes/MessageComponentInteraction#followup)
***
### getAppEntitlements()
> **getAppEntitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:207](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L207)
Returns entitlements belonging to this interaction's application.
#### Returns
`APIEntitlement`[]
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`getAppEntitlements`](/reference/classes/MessageComponentInteraction#getappentitlements)
***
### guildHavePremium()
> **guildHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:212](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L212)
Whether the guild this interaction was sent from currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`guildHavePremium`](/reference/classes/MessageComponentInteraction#guildhavepremium)
***
### inDM()
> **inDM**(): `this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
Defined in: [interactions/BaseInteraction.ts:202](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L202)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to `undefined` when the interaction was sent from a DM.
#### Returns
`this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`inDM`](/reference/classes/MessageComponentInteraction#indm)
***
### inGuild()
> **inGuild**(): `this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
Defined in: [interactions/BaseInteraction.ts:197](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L197)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to defined when the interaction was sent from a guild.
#### Returns
`this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`inGuild`](/reference/classes/MessageComponentInteraction#inguild)
***
### isAutocomplete()
> **isAutocomplete**(): `this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
Defined in: [interactions/BaseInteraction.ts:490](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L490)
Type guard: whether this is an autocomplete request for a slash command option.
#### Returns
`this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isAutocomplete`](/reference/classes/MessageComponentInteraction#isautocomplete)
***
### isButton()
> **isButton**(): `this is ButtonInteraction`
Defined in: [interactions/BaseInteraction.ts:460](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L460)
Type guard: whether this is a button click interaction.
#### Returns
`this is ButtonInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isButton`](/reference/classes/MessageComponentInteraction#isbutton)
***
### isChannelSelect()
> **isChannelSelect**(): `this is ChannelSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:485](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L485)
Type guard: whether this is a channel select menu interaction.
#### Returns
`this is ChannelSelectInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isChannelSelect`](/reference/classes/MessageComponentInteraction#ischannelselect)
***
### isChatInputCommand()
> **isChatInputCommand**(): `this is ChatInputCommandInteraction`
Defined in: [interactions/BaseInteraction.ts:421](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L421)
Type guard: whether this is a chat input (slash) command interaction.
#### Returns
`this is ChatInputCommandInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isChatInputCommand`](/reference/classes/MessageComponentInteraction#ischatinputcommand)
***
### isCommand()
> **isCommand**(): `this is CommandInteraction`
Defined in: [interactions/BaseInteraction.ts:416](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L416)
Type guard: whether this is an application command interaction (slash command or context menu command).
#### Returns
`this is CommandInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isCommand`](/reference/classes/MessageComponentInteraction#iscommand)
***
### isJSONEncodable()
> `protected` **isJSONEncodable**(`obj`): `obj is JSONEncodable`
Defined in: [interactions/BaseInteraction.ts:188](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L188)
#### Parameters
##### obj
`unknown`
#### Returns
`obj is JSONEncodable`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isJSONEncodable`](/reference/classes/MessageComponentInteraction#isjsonencodable)
***
### isMentionableSelect()
> **isMentionableSelect**(): `this is MentionableSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:480](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L480)
Type guard: whether this is a mentionable (user + role) select menu interaction.
#### Returns
`this is MentionableSelectInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isMentionableSelect`](/reference/classes/MessageComponentInteraction#ismentionableselect)
***
### isMessageComponent()
> **isMessageComponent**(): `this is MessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:455](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L455)
Type guard: whether this is a message component interaction (button or select menu).
#### Returns
`this is MessageComponentInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isMessageComponent`](/reference/classes/MessageComponentInteraction#ismessagecomponent)
***
### isMessageContextCommand()
> **isMessageContextCommand**(): `this is MessageContextInteraction`
Defined in: [interactions/BaseInteraction.ts:437](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L437)
Type guard: whether this is a message context menu command interaction.
#### Returns
`this is MessageContextInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isMessageContextCommand`](/reference/classes/MessageComponentInteraction#ismessagecontextcommand)
***
### isMessageModal()
> **isMessageModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:450](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L450)
Type guard: whether this is a modal submit interaction that opened from a message (not a slash command).
#### Returns
`this is ModalInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isMessageModal`](/reference/classes/MessageComponentInteraction#ismessagemodal)
***
### isModal()
> **isModal**(): `this is ModalInteraction`
Defined in: [interactions/BaseInteraction.ts:445](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L445)
Type guard: whether this is a modal submit interaction.
#### Returns
`this is ModalInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isModal`](/reference/classes/MessageComponentInteraction#ismodal)
***
### isRoleSelect()
> **isRoleSelect**(): `this is RoleSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:475](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L475)
Type guard: whether this is a role select menu interaction.
#### Returns
`this is RoleSelectInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isRoleSelect`](/reference/classes/MessageComponentInteraction#isroleselect)
***
### isStringSelect()
> **isStringSelect**(): `this is StringSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:465](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L465)
Type guard: whether this is a string select menu interaction.
#### Returns
`this is StringSelectInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isStringSelect`](/reference/classes/MessageComponentInteraction#isstringselect)
***
### isUserContextCommand()
> **isUserContextCommand**(): `this is UserContextInteraction`
Defined in: [interactions/BaseInteraction.ts:429](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L429)
Type guard: whether this is a user context menu command interaction.
#### Returns
`this is UserContextInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isUserContextCommand`](/reference/classes/MessageComponentInteraction#isusercontextcommand)
***
### isUserSelect()
> **isUserSelect**(): `this is UserSelectInteraction`
Defined in: [interactions/BaseInteraction.ts:470](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L470)
Type guard: whether this is a user select menu interaction.
#### Returns
`this is UserSelectInteraction`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isUserSelect`](/reference/classes/MessageComponentInteraction#isuserselect)
***
### reply()
> **reply**(`options`, `forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:273](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L273)
Sends the initial response to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The message content, or a string shorthand for `{ content: options }`
##### forceEphemeral?
`boolean` = `true`
Whether to force the response to be ephemeral (visible only to the invoking user). Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The created interaction response, including the created message.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`reply`](/reference/classes/MessageComponentInteraction#reply)
***
### showModal()
> **showModal**(`data`): `Promise`<`undefined`>
Defined in: [interactions/ModalCapableInteraction.ts:16](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ModalCapableInteraction.ts#L16)
Responds to the interaction with a modal.
#### Parameters
##### data
[`ModalInteractionResponseCallbackData`](/reference/types/ModalInteractionResponseCallbackData) \| `ModalBuilder`
The modal data to send
#### Returns
`Promise`<`undefined`>
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`showModal`](/reference/classes/MessageComponentInteraction#showmodal)
***
### toSnakeCase()
> `protected` **toSnakeCase**<`T`>(`obj`): `T`
Defined in: [interactions/BaseInteraction.ts:192](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L192)
#### Type Parameters
##### T
`T` = `unknown`
#### Parameters
##### obj
`unknown`
#### Returns
`T`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`toSnakeCase`](/reference/classes/MessageComponentInteraction#tosnakecase)
***
### update()
> **update**(`options`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:374](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L374)
Updates the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to update the message with
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
The updated message
This is mainly used for component interactions where you want to update the message the component is attached to OR for
moodal submit interactions to update the message that opened the modal.
After calling this method, the interaction is considered replied and you need to use `editReply` to edit the original response.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`update`](/reference/classes/MessageComponentInteraction#update)
***
### userHavePremium()
> **userHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:222](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L222)
Whether the user who triggered this interaction currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`userHavePremium`](/reference/classes/MessageComponentInteraction#userhavepremium)
# CachedChannel
> **CachedChannel** = [`CachedDMChannel`](/reference/types/CachedDMChannel) \| [`CachedThreadChannel`](/reference/types/CachedThreadChannel) \| [`CachedTextGuildChannel`](/reference/types/CachedTextGuildChannel) \| [`CachedVoiceGuildChannel`](/reference/types/CachedVoiceGuildChannel)
Defined in: [types/caching.ts:48](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/caching.ts#L48)
A channel as stored in the cache — a reduced, kind-specific subset of `APIChannel`'s fields.
# CachedDMChannel
> **CachedDMChannel** = `Pick`<`Extract`<`APIChannel`, {String.fromCharCode(123)} `type`: `ChannelType.DM` \| `ChannelType.GroupDM`; {String.fromCharCode(125)}>, `"id"` \| `"type"` \| `"name"`>
Defined in: [types/caching.ts:9](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/caching.ts#L9)
A DM or group DM channel as stored in the cache.
# CachedGuildMember
> **CachedGuildMember** = `Omit`<`APIGuildMember`, `"user"` \| `"deaf"` \| `"mute"`> & `object` & `Partial`<`Pick`<`APIGuildMember`, `"deaf"` \| `"mute"`>>
Defined in: [types/caching.ts:4](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/caching.ts#L4)
A guild member as stored in the cache. Like `APIGuildMember` but with `user` required (never partial).
## Type Declaration
### user
> **user**: `APIUser`
# CachedTextGuildChannel
> **CachedTextGuildChannel** = `Pick`<`Extract`<`APIChannel`, {String.fromCharCode(123)} `type`: `ChannelType.GuildText` \| `ChannelType.GuildAnnouncement`; {String.fromCharCode(125)}>, `"id"` \| `"type"` \| `"name"` \| `"guild_id"` \| `"nsfw"` \| `"parent_id"` \| `"permission_overwrites"` \| `"topic"`>
Defined in: [types/caching.ts:16](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/caching.ts#L16)
A text or announcement guild channel as stored in the cache.
# CachedThreadChannel
> **CachedThreadChannel** = `Pick`<`Extract`<`APIChannel`, {String.fromCharCode(123)} `type`: `ChannelType.PublicThread` \| `ChannelType.PrivateThread` \| `ChannelType.AnnouncementThread`; {String.fromCharCode(125)}>, `"id"` \| `"type"` \| `"name"` \| `"rate_limit_per_user"` \| `"parent_id"` \| `"guild_id"` \| `"nsfw"`>
Defined in: [types/caching.ts:11](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/caching.ts#L11)
A thread channel as stored in the cache.
# CachedVoiceGuildChannel
> **CachedVoiceGuildChannel** = `Pick`<`Extract`<`APIChannel`, {String.fromCharCode(123)} `type`: `ChannelType.GuildVoice` \| `ChannelType.GuildStageVoice`; {String.fromCharCode(125)}>, `"id"` \| `"type"` \| `"name"` \| `"guild_id"` \| `"parent_id"` \| `"permission_overwrites"` \| `"bitrate"` \| `"user_limit"` \| `"video_quality_mode"` \| `"rtc_region"`>
Defined in: [types/caching.ts:26](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/caching.ts#L26)
A voice or stage guild channel as stored in the cache.
# CacheNamespace
> **CacheNamespace** = `"channel"` \| `"dm-channel"` \| `"role"` \| `"user"` \| `"member"` \| `"guild"` \| `"guild-roles"`
Defined in: [types/caching.ts:46](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/types/caching.ts#L46)
Prefix used for cache keys of a given entity kind, in the form `{namespace}:{...parts}`.
# ChannelSelectInteraction
Defined in: [interactions/ChannelSelectInteraction.ts:8](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ChannelSelectInteraction.ts#L8)
A channel select menu interaction. Passed to a `ComponentHandler` registered for `ComponentType.ChannelSelect`.
## Extends
- [`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction)<`Context`, `ComponentType.ChannelSelect`>
## Type Parameters
### Context
`Context` *extends* [`BaseInteractionContext`](/reference/types/BaseInteractionContext) = [`BaseInteractionContext`](/reference/types/BaseInteractionContext)
## Properties
### \_ephemeral
> `protected` **\_ephemeral**: `boolean` \| `null` = `null`
Defined in: [interactions/BaseInteraction.ts:93](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L93)
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`_ephemeral`](/reference/classes/MessageComponentInteraction#_ephemeral)
***
### api
> `protected` **api**: `API`
Defined in: [interactions/BaseInteraction.ts:102](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L102)
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`api`](/reference/classes/MessageComponentInteraction#api)
***
### channels
> `readonly` **channels**: `Collection`<`string`, `APIInteractionDataResolvedChannel`>
Defined in: [interactions/ChannelSelectInteraction.ts:14](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ChannelSelectInteraction.ts#L14)
The selected channels, keyed by ID. Partial objects — only `id`, `type`, and `permissions` (plus a few type-specific fields) are populated.
***
### componentType
> `readonly` **componentType**: `ChannelSelect`
Defined in: [interactions/MessageComponentInteraction.ts:19](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L19)
The message component's type (button, string select, etc).
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`componentType`](/reference/classes/MessageComponentInteraction#componenttype)
***
### context
> `readonly` **context**: `Context`
Defined in: [interactions/BaseInteraction.ts:97](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L97)
The Hono interaction context this interaction was created from.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`context`](/reference/classes/MessageComponentInteraction#context-1)
***
### customId
> `readonly` **customId**: `string`
Defined in: [interactions/MessageComponentInteraction.ts:17](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L17)
The component's custom ID, as set when it was built. See the [Custom ID System](/docs/custom-id-system) guide.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`customId`](/reference/classes/MessageComponentInteraction#customid)
***
### deferred
> `protected` **deferred**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:95](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L95)
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`deferred`](/reference/classes/MessageComponentInteraction#deferred)
***
### fetcher
> `readonly` **fetcher**: [`Fetcher`](/reference/classes/Fetcher)
Defined in: [interactions/BaseInteraction.ts:99](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L99)
Cache-aware fetcher for resolving Discord entities referenced by this interaction.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`fetcher`](/reference/classes/MessageComponentInteraction#fetcher)
***
### message
> `readonly` **message**: `APIMessage`
Defined in: [interactions/MessageComponentInteraction.ts:15](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/MessageComponentInteraction.ts#L15)
The message the component is attached to.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`message`](/reference/classes/MessageComponentInteraction#message)
***
### raw
> `protected` `readonly` **raw**: `APIMessageComponentInteraction`
Defined in: [interactions/BaseInteraction.ts:90](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L90)
The raw interaction data
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`raw`](/reference/classes/MessageComponentInteraction#raw)
***
### replied
> `protected` **replied**: `boolean` = `false`
Defined in: [interactions/BaseInteraction.ts:94](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L94)
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`replied`](/reference/classes/MessageComponentInteraction#replied)
***
### rest
> `readonly` **rest**: `REST`
Defined in: [interactions/BaseInteraction.ts:92](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L92)
REST client used to make requests to the Discord API.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`rest`](/reference/classes/MessageComponentInteraction#rest)
***
### type
> `readonly` **type**: `MessageComponent`
Defined in: [interactions/BaseInteraction.ts:88](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L88)
The interaction's Discord interaction type.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`type`](/reference/classes/MessageComponentInteraction#type)
***
### values
> `readonly` **values**: `string`[]
Defined in: [interactions/ChannelSelectInteraction.ts:12](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/ChannelSelectInteraction.ts#L12)
IDs of the selected channels.
## Accessors
### applicationId
#### Get Signature
> **get** **applicationId**(): `string`
Defined in: [interactions/BaseInteraction.ts:114](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L114)
The ID of the application this interaction was sent to.
##### Returns
`string`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`applicationId`](/reference/classes/MessageComponentInteraction#applicationid)
***
### appPermissions
#### Get Signature
> **get** **appPermissions**(): `string`
Defined in: [interactions/BaseInteraction.ts:179](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L179)
Bitwise set of permissions the app has in the source location of the interaction.
##### Returns
`string`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`appPermissions`](/reference/classes/MessageComponentInteraction#apppermissions)
***
### channel
#### Get Signature
> **get** **channel**(): `Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:129](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L129)
The partial channel object the interaction was sent from, if any. Not cached — see [Honocord](/reference/classes/Honocord)'s runtime notes.
##### Returns
`Partial`<`APIAnnouncementThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGroupDMChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildCategoryChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildForumChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildMediaChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildStageVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIGuildVoiceChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APINewsChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPrivateThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APIPublicThreadChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `Partial`<`APITextChannel`> & `Pick`<`APIChannel`, `"id"` \| `"type"`> \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `never` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`channel`](/reference/classes/MessageComponentInteraction#channel)
***
### channelId
#### Get Signature
> **get** **channelId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:124](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L124)
The ID of the channel the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`channelId`](/reference/classes/MessageComponentInteraction#channelid)
***
### entitlements
#### Get Signature
> **get** **entitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:119](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L119)
Entitlements for the invoking user, for monetized apps.
##### Returns
`APIEntitlement`[]
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`entitlements`](/reference/classes/MessageComponentInteraction#entitlements)
***
### guild
#### Get Signature
> **get** **guild**(): `APIPartialInteractionGuild` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:139](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L139)
The partial guild object the interaction was sent from, if any. Not cached.
##### Returns
`APIPartialInteractionGuild` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`guild`](/reference/classes/MessageComponentInteraction#guild)
***
### guildId
#### Get Signature
> **get** **guildId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:134](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L134)
The ID of the guild the interaction was sent from, if any.
##### Returns
`string` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`guildId`](/reference/classes/MessageComponentInteraction#guildid)
***
### guildLocale
#### Get Signature
> **get** **guildLocale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:164](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L164)
The guild's locale, if sent from a guild.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`guildLocale`](/reference/classes/MessageComponentInteraction#guildlocale)
***
### id
#### Get Signature
> **get** **id**(): `string`
Defined in: [interactions/BaseInteraction.ts:174](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L174)
The interaction's ID.
##### Returns
`string`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`id`](/reference/classes/MessageComponentInteraction#id)
***
### locale
#### Get Signature
> **get** **locale**(): `Locale` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:159](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L159)
The invoking user's locale.
##### Returns
`Locale` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`locale`](/reference/classes/MessageComponentInteraction#locale)
***
### member
#### Get Signature
> **get** **member**(): `APIInteractionGuildMember` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:154](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L154)
The guild member who triggered the interaction, if sent from a guild.
##### Returns
`APIInteractionGuildMember` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`member`](/reference/classes/MessageComponentInteraction#member)
***
### token
#### Get Signature
> **get** **token**(): `string`
Defined in: [interactions/BaseInteraction.ts:169](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L169)
The interaction token, used to send/edit/delete responses.
##### Returns
`string`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`token`](/reference/classes/MessageComponentInteraction#token)
***
### user
#### Get Signature
> **get** **user**(): `APIUser`
Defined in: [interactions/BaseInteraction.ts:149](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L149)
The user who triggered the interaction (resolved from `member.user` in guilds, `user` in DMs).
##### Returns
`APIUser`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`user`](/reference/classes/MessageComponentInteraction#user)
***
### userId
#### Get Signature
> **get** **userId**(): `string` \| `undefined`
Defined in: [interactions/BaseInteraction.ts:144](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L144)
The ID of the user who triggered the interaction.
##### Returns
`string` \| `undefined`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`userId`](/reference/classes/MessageComponentInteraction#userid)
***
### version
#### Get Signature
> **get** **version**(): `1`
Defined in: [interactions/BaseInteraction.ts:184](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L184)
Discord's interaction payload version (always `1`).
##### Returns
`1`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`version`](/reference/classes/MessageComponentInteraction#version)
## Methods
### deferReply()
> **deferReply**(`forceEphemeral?`): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:296](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L296)
Acknowledges the interaction without sending an initial response, showing a "thinking" state.
Use `editReply` afterwards to send the actual response, within the 15-minute interaction token lifetime.
#### Parameters
##### forceEphemeral?
`boolean` = `true`
Whether the eventual response should be ephemeral. Defaults to `true`.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`deferReply`](/reference/classes/MessageComponentInteraction#deferreply)
***
### deferUpdate()
> **deferUpdate**(): `Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
Defined in: [interactions/BaseInteraction.ts:321](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L321)
Defers the update of a component interaction.
#### Returns
`Promise`<`RESTPostAPIInteractionCallbackWithResponseResult`>
A promise that resolves when the update is deferred
Responding to a component interaction via the deferUpdate() method acknowledges the interaction and resets the message state.
This method can be used to suppress the need for further responses, however it's encouraged to provide meaningful feedback to users via an update() or ephemeral reply() at least.\
Once deferUpdate() has been called, future messages can be sent by calling followUp() or edits can be made by calling editReply() on the component interaction.
Example flow:
1. User clicks a button.
2. Bot calls `deferUpdate()` to acknowledge the interaction.
3. Bot performs some processing.
4. Bot calls `editReply()` to update the original message.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`deferUpdate`](/reference/classes/MessageComponentInteraction#deferupdate)
***
### deleteReply()
> **deleteReply**(`messageId?`): `Promise`<`void`>
Defined in: [interactions/BaseInteraction.ts:359](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L359)
Deletes the original interaction response (or a follow-up message).
#### Parameters
##### messageId?
`string`
The message id to delete, defaults to `@original`
#### Returns
`Promise`<`void`>
A promise that resolves when the message is deleted
This is used to delete the original interaction response message or a follow-up message.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`deleteReply`](/reference/classes/MessageComponentInteraction#deletereply)
***
### editReply()
> **editReply**(`options`, `messageId?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:336](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L336)
Edits the original interaction response.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to edit the message with
##### messageId?
`string` = `"@original"`
The message id to edit, defaults to `@original`
#### Returns
`Promise`<`APIMessage`>
The edited message
This is used to edit the original interaction response message.
Before using this method, the interaction needs to be replied to first before using this method - with `reply`, `deferReply` or `update`.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`editReply`](/reference/classes/MessageComponentInteraction#editreply)
***
### followUp()
> **followUp**(`options`, `forceEphemeral?`): `Promise`<`APIMessage`>
Defined in: [interactions/BaseInteraction.ts:397](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L397)
Sends a follow-up message to the interaction.
#### Parameters
##### options
`string` \| [`InteractionResponseCallbackData`](/reference/types/InteractionResponseCallbackData)
The options to send the follow-up message with
##### forceEphemeral?
`boolean` = `false`
Whether to force the message to be ephemeral
#### Returns
`Promise`<`APIMessage`>
The sent follow-up message
This is used to send additional messages after the initial interaction response.
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`followUp`](/reference/classes/MessageComponentInteraction#followup)
***
### getAppEntitlements()
> **getAppEntitlements**(): `APIEntitlement`[]
Defined in: [interactions/BaseInteraction.ts:207](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L207)
Returns entitlements belonging to this interaction's application.
#### Returns
`APIEntitlement`[]
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`getAppEntitlements`](/reference/classes/MessageComponentInteraction#getappentitlements)
***
### guildHavePremium()
> **guildHavePremium**(): `boolean`
Defined in: [interactions/BaseInteraction.ts:212](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L212)
Whether the guild this interaction was sent from currently has an active, non-expired entitlement.
#### Returns
`boolean`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`guildHavePremium`](/reference/classes/MessageComponentInteraction#guildhavepremium)
***
### inDM()
> **inDM**(): `this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
Defined in: [interactions/BaseInteraction.ts:202](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L202)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to `undefined` when the interaction was sent from a DM.
#### Returns
`this is BaseInteraction & { guild: undefined; guild_id: undefined; guild_locale: undefined }`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`inDM`](/reference/classes/MessageComponentInteraction#indm)
***
### inGuild()
> **inGuild**(): `this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
Defined in: [interactions/BaseInteraction.ts:197](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L197)
Type guard narrowing `guild_id`/`guild`/`guild_locale` to defined when the interaction was sent from a guild.
#### Returns
`this is BaseInteraction & { guild: APIPartialInteractionGuild; guild_id: string; guild_locale: Locale }`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`inGuild`](/reference/classes/MessageComponentInteraction#inguild)
***
### isAutocomplete()
> **isAutocomplete**(): `this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
Defined in: [interactions/BaseInteraction.ts:490](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L490)
Type guard: whether this is an autocomplete request for a slash command option.
#### Returns
`this is AutocompleteInteraction & { type: ApplicationCommandAutocomplete }`
#### Inherited from
[`MessageComponentInteraction`](/reference/classes/MessageComponentInteraction).[`isAutocomplete`](/reference/classes/MessageComponentInteraction#isautocomplete)
***
### isButton()
> **isButton**(): `this is ButtonInteraction`
Defined in: [interactions/BaseInteraction.ts:460](https://github.com/The-LukeZ/honocord/blob/3990757dd97e163f18648bc8caeaaa478c90392b/src/interactions/BaseInteraction.ts#L460)
Type guard: whether this is a button click interaction.
#### Returns
`this is ButtonInteraction