Trouble enable/disabling module using an alias

modules
alias

#1

PhantomBot Version: 2.4.2
OS Version: Windows 10 Pro x64
Java Version: build 1.8.0_191-b12
Browser and Version (for Panel Support): Google Chrome version 71.0.3578.98
Stock PhantomBot: Yes

I’m attempting to quickly enable/disable the audioPanelSystem.js module using an alias I’m calling sfxoff/sfxon. What I’ve done so far is:

Alias the commands “!module enable ./systems/audioPanelSystem.js” and “!module disable ./systems/audioPanelSystem.js” to “sfxon” and “sfxoff” respectively.

Once those are made, I shut down the bot and open the database file using DB Browser for SQLite, navigate to the phantombot_aliases table, and modify the value of each of those commands in order to capitalize the P and S in audiopanelsystem so it reads as audioPanelSystem, apply and write the changes, close the browser and restart the bot.

However, those alias commands still do not work, as calling either sfxon or sfxoff cause the bot to return with
‘Usage: !module enable [module path]’.

This is a fresh install of Phantombot and I’ve double-checked my spelling and grammar. The module commands still work on their own without issue.

I would appreciate any help anyone can provide. Thank you.


#2

Alias supports one parameter, not multiple. So you can build up aliases like so, keep in mind that I didn’t update the database to camelcase the module.

aliascom moduleenable module enable
[01-01-2019 @ 22:46:25.825 MST] [aliascom] [moduleenable module enable
[01-01-2019 @ 22:46:25.827 MST] [MUTED] @IllusionaryBot, The command !module enable was successfully aliased to !moduleenable
moduleenable
[01-01-2019 @ 22:46:28.307 MST] [MUTED] @IllusionaryBot, Usage: !module enable [module path]
aliascom sfxon moduleenable ./systems/audioPanelSystem.js
[01-01-2019 @ 22:47:30.154 MST] [MUTED] @IllusionaryBot, The command !moduleenable ./systems/audiopanelsystem.js was successfully aliased to !sfxon
sfxon
[01-01-2019 @ 22:47:32.356 MST] [MUTED] @IllusionaryBot, That module does not exist or is not loaded!