mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 16:00:27 +00:00
NapCatQQ
This commit is contained in:
20
src/onebot11/action/llonebot/Config.ts
Normal file
20
src/onebot11/action/llonebot/Config.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user