ai/src/modules/ping/index.ts

17 lines
367 B
TypeScript

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.includes('ping')) {
msg.reply('PONG!');
return true;
} else {
return false;
}
}
}