mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-14 11:10:40 +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) {
|
setMacro(key, value, overwrite = true) {
|
||||||
this.macros[key] = value;
|
if (overwrite || !this.macroList.find(it=>it.key == key)) {
|
||||||
|
this.macros[key] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user