This allows you to run multiple bots from the same Budabot folder, but still have separate configs, and optionally share a database which might be handy for people who run linked org bots.
This change is in version 0.6.6.
Steps to use this:
1) make a copies of chatbot.bat (chatbot.sh if you're on Linux) for each bot you plan to run and rename them to something meaningful (eg, bot1.bat, bot2.bat)
2) open up each file you just copied and change "config.php" to something meaningful (eg, bot1config.php, bot2config.php)
3) make a copy of config.php and rename it to the names you specified in step 2) (eg, bot1config.php, bot2config.php)
4a) open each config file you copied in step 3 and set the properties for each bot. If you are linking two orgs bot, then you will want to share the database and it defaults to this so you don't need to do anything more. However, if you want them to use separate databases, you must put a unique database name in each config.php file on line 52:
Code: Select all
$settings['DB Name'] = "bot1.db";
Code: Select all
$settings['DB Name'] = "bot2.db";
etc. Of course if you are using MySQL you will have to change all the database settings to match your setup.
4b) If you don't want to configure the bots by editing the config.php file as outlined in 4a), you can instead run each bot, and walk through the on-screen setup. Note, that when it asks you to set up the database manually, you will need to say yes if you don't want the database to be shared among bots and then choose a unique database name for each bot.
That's it. You should then be able to run all your bots from one folder. When it comes time to upgrade or add new modules, you can do it in one place and it will upgrade all the bots you are running.
Note, when sharing the database, I do not know the implications of starting multiple bots at the same time due to the drop and reload of many of the tables during startup. I would recommend starting each bot one at a time until they are all running.