Right now the bot crashes on almost any error that occurs. I have a !exec command up that handles executing PHP code (only by me), but I have to triple-check my code because the bot will crash if anything is wrong with it.
Possibly the main loop could be wrapped in a try {} catch {exception} statement, but that won't catch everything. To add proper error handling the bot'll need a custom error handler like described here: http://php.net/manual/en/function.set-error-handler.php
Right now the bot crashes on almost any error that occurs. I have a !exec command up that handles executing PHP code (only by me), but I have to triple-check my code because the bot will crash if anything is wrong with it.
Possibly the main loop could be wrapped in a try {} catch {exception} statement, but that won't catch everything. To add proper error handling the bot'll need a custom error handler like described here: http://php.net/manual/en/function.set-error-handler.php