From bf40e8961d203122e16105fab7390e00d7331d8e Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Mar 2019 13:52:57 +0900 Subject: [PATCH] omedeto --- src/modules/core/index.ts | 10 ++++++++++ src/serifs.ts | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 27005e8..045d03f 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.omedeto(msg) || this.nadenade(msg) || this.kawaii(msg) || this.suki(msg) || @@ -152,6 +153,15 @@ export default class extends Module { return false; } + @autobind + private omedeto(msg: Message): boolean { + if (!msg.includes(['おめでと'])) return false; + + msg.reply(serifs.core.omedeto(msg.friend.name)); + + return true; + } + @autobind private nadenade(msg: Message): boolean { if (!msg.includes(['なでなで'])) return false; diff --git a/src/serifs.ts b/src/serifs.ts index eaf7c63..2abe478 100644 --- a/src/serifs.ts +++ b/src/serifs.ts @@ -24,6 +24,8 @@ export default { goodNight: name => name ? `おやすみなさい、${name}!` : 'おやすみなさい!', + omedeto: name => name ? `ありがとうございます、${name}♪` : 'ありがとうございます♪', + okaeri: { love: name => name ? [ `おかえりなさい、${name}♪`,