mirror of
https://github.com/nullnyat/NullcatChan.git
synced 2025-08-05 22:13:59 +09:00
✌️
This commit is contained in:
16
src/modules/ping/index.ts
Normal file
16
src/modules/ping/index.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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';
|
||||
|
@ -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';
|
||||
|
Reference in New Issue
Block a user