ai/src/modules/ping/index.ts

19 lines
400 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 {
2018-08-30 23:20:49 +00:00
public readonly 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;
}
}
}