Fix repeated flag handling

This commit is contained in:
kwaroran
2024-09-24 09:18:52 +09:00
parent e42776cd29
commit 5048307c03

View File

@@ -97,7 +97,10 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter
outScript += '\n'
}
//remove unsupported flag
flag = flag.replace(/[^dgimsuvy]/g, '')
flag = flag.trim().replace(/[^dgimsuvy]/g, '')
//remove repeated flags
flag = flag.split('').filter((v, i, a) => a.indexOf(v) === i).join('')
if(flag.length === 0){
flag = 'u'