You have to design your bot to be able to recover settings on restart. There is no “always on” service on the Internet. Every machine will have restarts for one reason or another. Every process will crash for one reason or another. The key is to design for the inevitable restart and load in the settings you need from a persistent store.