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…
Reference in New Issue