ai/src/modules/ping/index.ts

19 lines
391 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 name = 'ping';
2018-08-11 06:26:25 +00:00
public install = (ai: ) => { }
public onMention = (msg: MessageLike) => {
if (msg.text && msg.text.includes('ping')) {
2018-08-11 06:26:25 +00:00
msg.reply('PONG!');
return true;
} else {
return false;
}
}
}