mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
add setting macro if it not already exists somewhere in scope hierarchy
This commit is contained in:
@ -38,9 +38,11 @@ export class SlashCommandScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setMacro(key, value) {
|
setMacro(key, value, overwrite = true) {
|
||||||
|
if (overwrite || !this.macroList.find(it=>it.key == key)) {
|
||||||
this.macros[key] = value;
|
this.macros[key] = value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
existsVariableInScope(key) {
|
existsVariableInScope(key) {
|
||||||
|
Reference in New Issue
Block a user