This commit is contained in:
linyuchen committed 2024-04-15 00:09:08 +08:00
1 parent 0ef3e38d70
commit 356aba762c
218 files changed
+8465 -5

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import BaseAction from '../BaseAction';
import { OB11Config, ob11Config } from '@/onebot11/config';
import { ActionName } from '../types';
export class GetConfigAction extends BaseAction<null, OB11Config> {
actionName = ActionName.GetConfig;
protected async _handle(payload: null): Promise<OB11Config> {
return ob11Config;
}
}
export class SetConfigAction extends BaseAction<OB11Config, void> {
actionName = ActionName.SetConfig;
protected async _handle(payload: OB11Config): Promise<void> {
ob11Config.save(payload);
}
}