From 54043c490198bb6b594bdf73e4ead108389b7f0f Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 26 Jun 2019 20:56:34 +0900 Subject: [PATCH] Resolve #40 --- src/modules/core/index.ts | 10 ++++++++++ src/serifs.ts | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 045d03f..8926ff9 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -27,6 +27,7 @@ export default class extends Module { return ( this.setName(msg) || this.greet(msg) || + this.erait(msg) || this.omedeto(msg) || this.nadenade(msg) || this.kawaii(msg) || @@ -153,6 +154,15 @@ export default class extends Module { return false; } + @autobind + private erait(msg: Message): boolean { + if (!msg.includes(['褒めて'])) return false; + + msg.reply(getSerif(serifs.core.erait(msg.friend.name))); + + return true; + } + @autobind private omedeto(msg: Message): boolean { if (!msg.includes(['おめでと'])) return false; diff --git a/src/serifs.ts b/src/serifs.ts index c56cd92..0bb40d8 100644 --- a/src/serifs.ts +++ b/src/serifs.ts @@ -26,6 +26,14 @@ export default { omedeto: name => name ? `ありがとうございます、${name}♪` : 'ありがとうございます♪', + erait: name => name ? [ + `${name}、今日もえらいです!`, + `${name}、今日もえらいですよ~♪` + ] : [ + `今日もえらいです!`, + `今日もえらいですよ~♪` + ], + okaeri: { love: name => name ? [ `おかえりなさい、${name}♪`,