Skip to content

CommandService

Call

typescript
import { PLAPI } from "paperlib-api/api";

PLAPI.commandService.methodname(...);

Avaliable Methods

getRegisteredCommands

typescript
/**
* Get registered commands.
* @param filter - Filter string
* @returns - Sorted array of filtered commands
*/
getRegisteredCommands(filter?: string): Promise<ICommand[]>;

run

typescript
/**
* Run command.
* @param id - Command ID
* @param args - Command arguments
*/
run(id: string, ...args: any[]): Promise<void>;

registerExternel

typescript
/**
* Register externel command.
* @param command - Externel command
*/
registerExternel(command: IExternelCommand): () => Promise<void>;

Events

Event IDCallback ValueDescription
your-registed-command-event{key: 'your-registed-command-event', value: someargs}When Tags database are updated

Created by Future Scholars. Contact: hi@paperlib.app