mirror of
https://github.com/syuilo/ai.git
synced 2024-11-22 05:08:00 +00:00
長い名前は弾くように
This commit is contained in:
parent
805b25bb51
commit
91995c9340
|
@ -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('くん') ||
|
||||
|
|
|
@ -7,6 +7,7 @@ export default {
|
|||
goodMorningWithName: 'おはようございます、{name}!',
|
||||
goodNight: 'おやすみなさい!',
|
||||
goodNightWithName: 'おやすみなさい、{name}!',
|
||||
tooLong: '長すぎる気がします...'
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue