Files
plainleaf/client/types/command.ts
T
Zef Hemel ea08c85202 Fixes #928
Command runs are now persisted to datastore
2025-09-29 15:20:14 +02:00

20 lines
484 B
TypeScript

import type {
CommandDef,
SlashCommandDef,
} from "@silverbulletmd/silverbullet/type/manifest";
import type { SlashCompletions } from "@silverbulletmd/silverbullet/type/client";
export type Command = CommandDef & {
run?: (args?: any[]) => Promise<any>;
lastRun?: number;
};
export type SlashCommand = SlashCommandDef & {
run: (...args: any[]) => Promise<SlashCompletions>;
};
export type CommandHookEvents = {
commandsUpdated(commands: Map<string, Command>): void;
};