mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
17 lines
586 B
TypeScript
17 lines
586 B
TypeScript
import BaseAction from '../BaseAction'
|
|
import { handleQuickOperation, QuickOperation, QuickOperationEvent } from '../quick-operation'
|
|
import { log } from '@/common/utils'
|
|
import { ActionName } from '../types'
|
|
|
|
interface Payload{
|
|
context: QuickOperationEvent,
|
|
operation: QuickOperation
|
|
}
|
|
|
|
export class GoCQHTTHandleQuickOperation extends BaseAction<Payload, null>{
|
|
actionName = ActionName.GoCQHTTP_HandleQuickOperation
|
|
protected async _handle(payload: Payload): Promise<null> {
|
|
handleQuickOperation(payload.context, payload.operation).then().catch(log);
|
|
return null
|
|
}
|
|
} |