UNPKG

@ebonydevcopy/framework

Version:

A module-based NodeJS chatbot framework.

28 lines 698 B
/** * ebony-framework * * @module utilities/TextMatcher * @author Christos Panagiotakopoulos <chrispanag@gmail.com> * @copyright Copyright(c) 2020 Christos Panagiotakopoulos * @license MIT * */ import { IPayload } from '../interfaces/payload'; export interface ITextRule { regex: RegExp; action: (user: any, payload?: IPayload, ...args: any[]) => any; } /** * A Text Matcher */ export default class TextMatcher { private rules; /** * Adds text rules */ importRules(rules: ITextRule[]): void; ruleMatcher(message: { text: string; }): ((user: any, payload?: IPayload, ...args: any[]) => any) | false; } //# sourceMappingURL=TextMatcher.d.ts.map