Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface DiscordInteractionData
import { type DiscordInteractionData } from "https://deno.land/x/discordeno@18.0.1/template/beginner/deps.ts";

Properties

optional
component_type: MessageComponentTypes

The type of component

optional
custom_id: string

The custom id provided for this component.

optional
components: DiscordMessageComponents

The components if its a Modal Submit interaction.

optional
values: string[]

The values chosen by the user.

id: string

The Id of the invoked command

name: string

The name of the invoked command

type: ApplicationCommandTypes

the type of the invoked command

optional
resolved: { messages?: Record<string, DiscordMessage>; users?: Record<string, DiscordUser>; members?: Record<string, Omit<DiscordInteractionMember, "user" | "deaf" | "mute">>; roles?: Record<string, DiscordRole>; channels?: Record<string, Pick<DiscordChannel,
| "id"
| "name"
| "type"
| "permissions"
>>; attachments: Record<string, DiscordAttachment>; }

Converted users + roles + channels + attachments

optional
options: DiscordInteractionDataOption[]

The params + values from the user

optional
target_id: string

The target id if this is a context menu command.

optional
guild_id: string

the id of the guild the command is registered to