0
0
Fork 0

feat: appendHashtag column

This commit is contained in:
아르페 2024-01-31 03:28:59 +09:00
parent 8507761272
commit 650af9c5ca
6 changed files with 36 additions and 2 deletions

View file

@ -42,8 +42,12 @@ export const format = (user: IUser, count: Count): string => {
...getDelta(user, count),
};
const template = user.template || defaultTemplate;
return template.replace(variableRegex, (m, name) => {
let result = template.replace(variableRegex, (m, name) => {
const v = variables[name];
return !v ? m : typeof v === 'function' ? v(score, user) : v;
}) + '\n\n#misshaialert';
});
if (user.appendHashtag) {
result = result + '\n\n#misshaialert'
}
return result;
};