mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
21 lines
547 B
TypeScript
21 lines
547 B
TypeScript
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);
|
|
}
|
|
}
|