epic-chat-bot
Version:
A simple chat bot module.
50 lines • 1.96 kB
TypeScript
/// <reference types="node" />
/// <reference types="socket.io-client" />
import events from 'events';
import { TRAININGOBJECT, TRAINING } from "epic-chat-bot-teacher";
import { epicChatHelper, CLIENT, MESSAGE } from "epic-chat-helper";
export declare type SENT_MESSAGE = {
sender: CLIENT;
message: MESSAGE | any;
};
export declare enum STATUS {
ONLINE = "Online",
OFFLINE = "Offline"
}
export declare enum GENDER {
MALE = "Male",
FEMALE = "Female"
}
export declare class epicChatBot {
protected name: string;
protected gender: GENDER;
protected status: STATUS;
protected variables: object;
protected chatInitialized: boolean;
protected blackListWords: string[];
protected requestHistory: any;
protected responseObject: TRAININGOBJECT | undefined;
protected events: events.EventEmitter;
protected chatHelper: epicChatHelper | null;
protected socketUri: string | null;
protected defaultTrainingObject: TRAININGOBJECT;
protected trainingObjects: TRAINING;
protected me: CLIENT | null;
eventPrefix: string;
constructor(name?: string, gender?: GENDER, status?: STATUS, variables?: object);
toggleStatus: () => this;
toggleInitialization: () => this;
getStatus: () => STATUS;
train: (data: TRAINING) => this;
unTrain: () => this;
getrequestHistory: () => any;
protected evaluate: (request: string) => boolean;
protected listen: (request: string) => null;
request: (request: string) => this;
protected answerTemplate: (string: string, index: number, destination: "answerObject" | "repeatObject") => this;
response: () => TRAININGOBJECT | null;
chat: (helper: epicChatHelper, connectOptions?: SocketIOClient.ConnectOpts | undefined) => this;
event: (event: string, data: any) => this;
on: (event: string, handler: any) => this;
}
//# sourceMappingURL=epicChatBot.d.ts.map