From 7253cd42dd943cde8cd4e30150158b3c5edfdc8f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 31 Jan 2019 12:38:12 +0900 Subject: [PATCH] itai --- src/modules/core/index.ts | 13 +++++++++++++ src/serifs.ts | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index cb1108d..0a7bfb1 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -33,6 +33,7 @@ export default class extends Module { this.hug(msg) || this.humu(msg) || this.batou(msg) || + this.itai(msg) || this.ponkotu(msg) || this.rmrf(msg) || this.shutdown(msg) @@ -279,6 +280,18 @@ export default class extends Module { return true; } + @autobind + private itai(msg: Message): boolean { + if (!msg.or(['痛い', 'いたい'])) return false; + + // メッセージのみ + if (!msg.isDm) return true; + + msg.reply(serifs.core.itai(msg.friend.name)); + + return true; + } + @autobind private ponkotu(msg: Message): boolean | HandlerResult { if (!msg.includes(['ぽんこつ'])) return false; diff --git a/src/serifs.ts b/src/serifs.ts index b0cfe79..d48934d 100644 --- a/src/serifs.ts +++ b/src/serifs.ts @@ -98,6 +98,8 @@ export default { hate: '…頭大丈夫ですか?' }, + itai: name => name ? `${name}、大丈夫ですか…? いたいのいたいの飛んでけっ!` : '大丈夫ですか…? いたいのいたいの飛んでけっ!', + shutdown: '私まだ眠くないですよ...?', },