more erait

This commit is contained in:
syuilo 2019-06-27 14:54:09 +09:00
parent 54043c4901
commit a5232195dc
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 24 additions and 8 deletions

View file

@ -156,9 +156,15 @@ export default class extends Module {
@autobind
private erait(msg: Message): boolean {
const match = msg.extractedText.match(/(.+?)たから褒めて/);
if (match) {
msg.reply(getSerif(serifs.core.erait.specify(match[1], msg.friend.name)));
return true;
}
if (!msg.includes(['褒めて'])) return false;
msg.reply(getSerif(serifs.core.erait(msg.friend.name)));
msg.reply(getSerif(serifs.core.erait.general(msg.friend.name)));
return true;
}

View file

@ -26,7 +26,8 @@ export default {
omedeto: name => name ? `ありがとうございます、${name}` : 'ありがとうございます♪',
erait: name => name ? [
erait: {
general: name => name ? [
`${name}、今日もえらいです!`,
`${name}、今日もえらいですよ~♪`
] : [
@ -34,6 +35,15 @@ export default {
`今日もえらいですよ~♪`
],
specify: (thing, name) => name ? [
`${name}${thing}てえらいです!`,
`${name}${thing}てえらいですよ~♪`
] : [
`${thing}てえらいです!`,
`${thing}てえらいですよ~♪`
],
},
okaeri: {
love: name => name ? [
`おかえりなさい、${name}`,