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: '長すぎる気がします...' }, /**