refactor: move calls & clean code

This commit is contained in:
Seijo Cecilia
2024-08-26 14:21:31 +08:00
parent 4f98c0d045
commit 3f3d9cc6f1
9 changed files with 42 additions and 118 deletions

View File

@@ -1,4 +1,3 @@
import { handleQuickOperation } from '@/onebot/helper/quick';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { QuickAction, QuickActionEvent } from '@/onebot/types';
@@ -12,7 +11,9 @@ export class GoCQHTTPHandleQuickAction extends BaseAction<Payload, null> {
actionName = ActionName.GoCQHTTP_HandleQuickAction;
async _handle(payload: Payload): Promise<null> {
handleQuickOperation(this.core, this.obContext, payload.context, payload.operation).then().catch(this.core.context.logger.logError);
this.obContext.apis.QuickActionApi
.handleQuickOperation(payload.context, payload.operation)
.catch(this.core.context.logger.logError);
return null;
}
}