mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
18 lines
587 B
TypeScript
18 lines
587 B
TypeScript
import { BaseAction } from '../BaseAction'
|
|
import { handleQuickOperation, QuickOperation, QuickOperationEvent } from '../../helper/quickOperation'
|
|
import { ActionName } from '../types'
|
|
|
|
interface Payload {
|
|
context: QuickOperationEvent,
|
|
operation: QuickOperation
|
|
}
|
|
|
|
export class HandleQuickOperation extends BaseAction<Payload, null> {
|
|
actionName = ActionName.GoCQHTTP_HandleQuickOperation
|
|
|
|
protected async _handle(payload: Payload): Promise<null> {
|
|
handleQuickOperation(this.ctx, payload.context, payload.operation).catch(e => this.ctx.logger.error(e))
|
|
return null
|
|
}
|
|
}
|