Variables: Allow adding an alias to a built-in variable from a plugin
Describe the solution you'd like
replaceVariableManager.addAliasToVariable(variableHandle: string, newAliasToAdd: string)
This would add a new alias to an existing variable definition. Such a function needs to be available to plugins, which would be the primary use case for this functionality.
Additional context This is for backward compatibility for any plugins that were created before the various "add event X to Firebot thing Y" features were added. Or maybe in the future, for plugins that exist but then get adopted into upstream Firebot but with different variable names.
My use case: I have some scripts from before all of that existed, where I created my own variables out of necessity. For example, I had an event that did a moderator-like thing but could not use $moderator because of the prior limitations, so I made $myPluginModerator with the same code as a workaround.
Now that I can use addEventToVariable instead, I would like not to maintain the old duplicate variable definitions. However, users might still have $myPluginModerator in their configuration. As things stand, I either need to formally deprecate this or maintain it forever. However, if I was able to "tell" Firebot that the built-in $moderator variable now also has the alias $myPluginModerator then this would address the backward compatibility forever.