Fix empty stat and original param

This commit is contained in:
Cohee1207
2023-07-22 14:10:21 +03:00
parent ed366b15ca
commit 212e98302a
2 changed files with 16 additions and 2 deletions

View File

@@ -256,6 +256,19 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
let stat = charStats[characters[this_chid].avatar];
if (!stat) {
stat = {
total_gen_time: 0,
user_word_count: 0,
non_user_msg_count: 0,
user_msg_count: 0,
non_user_msg_count: 0,
total_swipe_count: 0,
date_first_chat: Date.now(),
date_last_chat: Date.now(),
};
}
stat.total_gen_time += calculateGenTime(
line.gen_started,
line.gen_finished