• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN config.ini - AllowReload, WatchScripts help

martindines

Member
Hi there,

I have not been able to enable the AllowReload configuration option (as specified in https://wiki.sinusbot.com/en:guides:other:configuration#scripts), either with, or without, WatchScripts specified.

My configuration is as follows:

Code:
[Scripts]
  AllowReload = true
  WatchScripts = ["script-name.js"]

The documentation does not clarify the exact usage of AllowReload.

- What is recognised as a script change to trigger reload?
- Is a WatchScripts definition required?
- Are the file names matched to the <sinusbot_root>/scripts directory?
- Are there any additional steps required to enable Script Reload on change?

Many thanks
Martin
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
- What is recognised as a script change to trigger reload?
when the file gets written to
- Is a WatchScripts definition required?
When you want the script to be reloaded you obviously have to set it in the config, so yes?
AllowReload just allows reloading, but doesn't do it automatically.
- Are the file names matched to the <sinusbot_root>/scripts directory?
yes
- Are there any additional steps required to enable Script Reload on change?
restart the bot after changing the config, otherwise: no
 

martindines

Member
Great, thanks irgendwer

The reason I asked re WatchScripts requirement: it could be interpreted that AllowReload serves as a "Watch all", with WatchScripts allowing finer control.

Will give it a shot now, cheers
 
Top