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,13 +26,23 @@ export default {
omedeto: name => name ? `ありがとうございます、${name}` : 'ありがとうございます♪',
erait: name => name ? [
`${name}、今日もえらいです!`,
`${name}、今日もえらいですよ~♪`
] : [
`今日もえらいです!`,
`今日もえらいですよ~♪`
],
erait: {
general: name => name ? [
`${name}、今日もえらいです!`,
`${name}、今日もえらいですよ~♪`
] : [
`今日もえらいです!`,
`今日もえらいですよ~♪`
],
specify: (thing, name) => name ? [
`${name}${thing}てえらいです!`,
`${name}${thing}てえらいですよ~♪`
] : [
`${thing}てえらいです!`,
`${thing}てえらいですよ~♪`
],
},
okaeri: {
love: name => name ? [