misc_functions: Fix error handling when debug channel is not set or the bot is disconnected
misc_functions: Fix error handling when debug channel is not set or the bot is disconnected

cmende/foobot2,cmende/foobot2