more erait

This commit is contained in:
syuilo
2019-06-27 14:54:09 +09:00
parent 54043c4901
commit a5232195dc
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;
}