We currently don't have a way for scripts to know if bots are allowed or not in a region.
Please add "deny_bots" to llGetEnv().
This should point to the same value set by the parameter of the same name in the region console.
Thanks.