From 91995c93401825da0422b7423364e586a0ec9d1c Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 27 Aug 2018 07:13:04 +0900 Subject: [PATCH] =?UTF-8?q?=E9=95=B7=E3=81=84=E5=90=8D=E5=89=8D=E3=81=AF?= =?UTF-8?q?=E5=BC=BE=E3=81=8F=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/core/index.ts | 5 +++++ src/serifs.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index cb319dc..697b88b 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -26,6 +26,11 @@ export default class CoreModule implements IModule { const name = msg.text.match(/^(.+?)って呼んで/)[1]; + if (name.length > 10) { + msg.reply(serifs.core.tooLong); + return true; + } + const withSan = name.endsWith('さん') || name.endsWith('くん') || diff --git a/src/serifs.ts b/src/serifs.ts index 24da184..83053ad 100644 --- a/src/serifs.ts +++ b/src/serifs.ts @@ -7,6 +7,7 @@ export default { goodMorningWithName: 'おはようございます、{name}!', goodNight: 'おやすみなさい!', goodNightWithName: 'おやすみなさい、{name}!', + tooLong: '長すぎる気がします...' }, /**