Extend case for chat index and role
This commit is contained in:
@@ -926,6 +926,10 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string
|
||||
return db.subModel
|
||||
}
|
||||
case 'role': {
|
||||
if (chatID !== -1) {
|
||||
const selchar = db.characters[get(selectedCharID)]
|
||||
return selchar.chats[selchar.chatPage].message[chatID].role;
|
||||
}
|
||||
return matcherArg.role ?? 'role'
|
||||
}
|
||||
case 'jbtoggled':{
|
||||
|
||||
@@ -197,7 +197,7 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter
|
||||
}
|
||||
}
|
||||
else{
|
||||
data = risuChatParser(data.replace(reg, outScript))
|
||||
data = risuChatParser(data.replace(reg, outScript), { chatID: chatID })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user