Improve AI

This commit is contained in:
syuilo
2018-08-27 06:59:18 +09:00
parent d30a98bf2e
commit 805b25bb51
6 changed files with 147 additions and 7 deletions

View File

@ -35,8 +35,9 @@ export default class TimerModule implements IModule {
const str = `${hours ? hoursQuery[0] : ''}${minutes ? minutesQuery[0] : ''}${seconds ? secondsQuery[0] : ''}`;
setTimeout(() => {
const name = this.ai.getName(msg.userId);
this.ai.sendMessage(msg.userId, {
text: serifs.timer.notify.replace('{time}', str)
text: name ? serifs.timer.notifyWithName.replace('{time}', str).replace('{name}', name) : serifs.timer.notify.replace('{time}', str)
});
}, time);