Skip to content

ImplementedSlashCommand

Defined in: packages/platform-discord/src/commands/slash-command.ts:488

A slash command implementation with its contract and registration JSON.

Name extends string = string

Params = object

readonly component: Any

Defined in: packages/platform-discord/src/commands/slash-command.ts:494


readonly contract: SlashCommandContract<Name, Params>

Defined in: packages/platform-discord/src/commands/slash-command.ts:493


readonly optional json?: SlashCommandJson

Defined in: packages/platform-discord/src/client/core.ts:93

Registration JSON for Discord.

RegisteredCommand.json


readonly name: Name

Defined in: packages/platform-discord/src/commands/slash-command.ts:492

RegisteredCommand.name


readonly optional session?: object

Defined in: packages/platform-discord/src/client/core.ts:96

The component a resumed message from this command should mount.

readonly component: AnyComponent

readonly optional decodeProps?: (props, interaction) => unknown

unknown

DiscordInteraction

unknown

readonly key: string

readonly optional layer?: Layer<any, never, never>

Provided again when a restarted process resumes the component.

RegisteredCommand.session

handler(interaction, client): Effect<void>

Defined in: packages/platform-discord/src/client/core.ts:94

DiscordInteraction

CommandClient

Effect<void>

RegisteredCommand.handler