Add commands API (#38)

This commit is contained in:
ArjixWasTaken 2022-10-06 01:11:32 +03:00 committed by GitHub
parent a9e67aa340
commit e563521416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 267 additions and 35 deletions

View file

@ -1,3 +1,5 @@
import { Command } from "../api/Commands";
// exists to export default definePlugin({...})
export default function definePlugin(p: PluginDef & Record<string, any>) {
return p;
@ -31,6 +33,7 @@ interface PluginDef {
start?(): void;
stop?(): void;
patches?: Omit<Patch, "plugin">[];
commands?: Command[];
dependencies?: string[],
required?: boolean;
/**