mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 05:46:16 +00:00
25 lines
871 B
TypeScript
Executable File
25 lines
871 B
TypeScript
Executable File
import type { ClientOperation, Logger } from '@revanced/bot-shared'
|
|
import type { Worker as TesseractWorker } from 'tesseract.js'
|
|
import type { ClientPacketObject } from '../classes/Client'
|
|
import type { WitMessageResponse } from '../context'
|
|
import type { Config } from '../utils/config'
|
|
|
|
export { default as parseImageEventHandler } from './parseImage'
|
|
export { default as parseTextEventHandler } from './parseText'
|
|
export { default as trainMessageEventHandler } from './trainMessage'
|
|
|
|
export type EventHandler<POp extends ClientOperation> = (
|
|
packet: ClientPacketObject<POp>,
|
|
context: EventContext,
|
|
) => void | Promise<void>
|
|
|
|
export type EventContext = {
|
|
wit: {
|
|
train(text: string, label: string): Promise<void>
|
|
message(text: string): Promise<WitMessageResponse>
|
|
}
|
|
tesseract: TesseractWorker
|
|
logger: Logger
|
|
config: Config
|
|
}
|