[fix] optional argument
This commit is contained in:
@@ -988,4 +988,21 @@ export function getVarChat(targetIndex = -1, chara:character|groupChat = null){
|
||||
}
|
||||
}
|
||||
return vars
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function editDisplay(text){
|
||||
let rt = ""
|
||||
if(!text.includes("<obs>")){
|
||||
return text
|
||||
}
|
||||
|
||||
for(let i=0;i<text.length;i++){
|
||||
const obfiEffect = "!@#$%^&*"
|
||||
if(Math.random() < 0.4){
|
||||
rt += obfiEffect[Math.floor(Math.random() * obfiEffect.length)]
|
||||
}
|
||||
rt += text[i]
|
||||
}
|
||||
return rt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user