mirror of
https://github.com/syuilo/ai.git
synced 2024-11-22 13:17:59 +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];
|
const name = msg.text.match(/^(.+?)って呼んで/)[1];
|
||||||
|
|
||||||
|
if (name.length > 10) {
|
||||||
|
msg.reply(serifs.core.tooLong);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const withSan =
|
const withSan =
|
||||||
name.endsWith('さん') ||
|
name.endsWith('さん') ||
|
||||||
name.endsWith('くん') ||
|
name.endsWith('くん') ||
|
||||||
|
|
|
@ -7,6 +7,7 @@ export default {
|
||||||
goodMorningWithName: 'おはようございます、{name}!',
|
goodMorningWithName: 'おはようございます、{name}!',
|
||||||
goodNight: 'おやすみなさい!',
|
goodNight: 'おやすみなさい!',
|
||||||
goodNightWithName: 'おやすみなさい、{name}!',
|
goodNightWithName: 'おやすみなさい、{name}!',
|
||||||
|
tooLong: '長すぎる気がします...'
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue