mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-12 10:00:36 +01:00
add setting macro if it not already exists somewhere in scope hierarchy
This commit is contained in:
parent
ba0f5427cf
commit
8785a0a5a3
@ -38,8 +38,10 @@ export class SlashCommandScope {
|
||||
}
|
||||
|
||||
|
||||
setMacro(key, value) {
|
||||
this.macros[key] = value;
|
||||
setMacro(key, value, overwrite = true) {
|
||||
if (overwrite || !this.macroList.find(it=>it.key == key)) {
|
||||
this.macros[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user