ai/src/modules/ping/index.ts

17 lines
371 B
TypeScript
Raw Normal View History

2018-08-11 06:26:25 +00:00
import from '../../ai';
import IModule from '../../module';
import MessageLike from '../../message-like';
export default class PingModule implements IModule {
public install = (ai: ) => { }
public onMention = (msg: MessageLike) => {
if (msg.text && msg.text.indexOf('ping') > -1) {
msg.reply('PONG!');
return true;
} else {
return false;
}
}
}