Add date & time substitution params. #155

This commit is contained in:
SillyLossy
2023-05-20 23:35:39 +03:00
parent db6dad5b2d
commit 6c2b72ac7f

View File

@ -1268,6 +1268,8 @@ function substituteParams(content, _name1, _name2) {
content = content.replace(/{{char}}/gi, _name2); content = content.replace(/{{char}}/gi, _name2);
content = content.replace(/<USER>/gi, _name1); content = content.replace(/<USER>/gi, _name1);
content = content.replace(/<BOT>/gi, _name2); content = content.replace(/<BOT>/gi, _name2);
content = content.replace(/{{time}}/gi, moment().format('LT'));
content = content.replace(/{{date}}/gi, moment().format('LL'));
return content; return content;
} }
@ -1370,7 +1372,7 @@ export function extractMessageBias(message) {
let biasString = ''; let biasString = '';
if (found.length) { if (found.length) {
biasString = ` ${found.join(" ")} ` biasString = ` ${found.join(" ")}`
} }
return biasString; return biasString;