import { Context } from 'koishi'; import { Config, BadWordItem } from '../config'; import { HistoryService } from './history'; export interface CheckResult { detected: boolean; censoredText?: string; detectedWords?: string[]; } export declare class DetectorService { private ctx; private config; private logger; private localDictCache; private ignoredWordsCache; private history; constructor(ctx: Context, config: Config, history: HistoryService); private initCache; init(): Promise; addWord(groupId: string, word: string): Promise; removeWord(groupId: string, word: string): Promise; getWords(groupId: string): BadWordItem[]; addIgnoredWord(groupId: string, word: string): Promise; removeIgnoredWord(groupId: string, word: string): Promise; getIgnoredWords(groupId: string): string[]; isIgnored(groupId: string, word: string): boolean; parseLocalDict(dictStr: string): BadWordItem[]; reloadGroup(groupId: string): void; check(content: string, groupId: string, userId: string, groupConfig: any): Promise; private checkWithAI; private checkWithBaidu; private checkWithAliyun; private checkWithTencent; private checkWithApi; private checkWithLocal; }