mirror of
https://github.com/syuilo/ai.git
synced 2024-11-14 01:37:59 +00:00
17 lines
367 B
TypeScript
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;
|
|
}
|
|
}
|
|
}
|