def shutdown(self): logger.info('Shutting down...') deactivate_all_plugins() self.close_storage() holder.session_store.shelf.close() self.loop.stop() logger.info('Shutdown complete. Bye')
def restart(self, mess, args): """ Restart the bot """ mess.send("Deactivating all the plugins...") deactivate_all_plugins() mess.send("Restarting") holder.bot.shutdown() global_restart() return "I'm restarting..."
def disconnect_callback(self): self.remove_commands_from(self) logger.info('Disconnect callback, deactivating all the plugins.') deactivate_all_plugins()