From d67903cb43a2b3dfc719a14b103a96547b27d172 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 13 Jan 2019 12:14:46 +0900 Subject: [PATCH] rmrf --- src/modules/core/index.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 8bcbef5..665d799 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -36,7 +36,8 @@ export default class CoreModule implements IModule { this.hug(msg) || this.humu(msg) || this.batou(msg) || - this.ponkotu(msg) + this.ponkotu(msg) || + this.rmrf(msg) ); } @@ -317,6 +318,16 @@ export default class CoreModule implements IModule { }; } + private rmrf = (msg: MessageLike): boolean | Result => { + if (!msg.includes(['rm -rf'])) return false; + + msg.friend.decLove(); + + return { + reaction: 'angry' + }; + } + public onReplyThisModule = (msg: MessageLike, data: any) => { if (msg.text == null) return;