Closed danimesq closed 8 years ago
Yes, because if you restart the bot, all data stored in RAM is deleted, similar if you are battling and shut off the computer. For that reason when you use .kill and the bot is battling, it says there is a battle in progress, so if you use .forcekill or send a SIGINT/SIGTERM/SIGKILL you are aware that the bot will not return to the battle.
You can use .join battle-id
and then .custom [battle-id] /joinbattle
to re-join a battle.
Maybe a joinbattle battle-id
commad to combine both lines is a good solution.
An good solution for this is storing all current battles in a .json file for bot returning after, like an human does.
Done in f5547304efce6cfad83fbd5abb74bc3a9b817c1c
You can enable the new battle autojoin feature setting exports.abandonedBattleAutojoin = true;
in config.js
When restart bot and bot is battling, the bot don't return to the battle.