This commit is contained in:
syuilo
2018-08-11 15:26:25 +09:00
parent d5120ca0b0
commit 6160d0f825
10 changed files with 192 additions and 127 deletions

16
src/modules/ping/index.ts Normal file
View File

@ -0,0 +1,16 @@
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;
}
}
}

View File

@ -1,6 +1,6 @@
import * as childProcess from 'child_process';
const ReconnectingWebSocket = require('../../../node_modules/reconnecting-websocket/dist/reconnecting-websocket-cjs.js');
import from '../..';
import from '../../ai';
import IModule from '../../module';
import serifs from '../../serifs';
import config from '../../config';

View File

@ -1,6 +1,6 @@
import * as childProcess from 'child_process';
import * as WebSocket from 'ws';
import from '../..';
import from '../../ai';
import IModule from '../../module';
import serifs from '../../serifs';
import config from '../../config';