from borealis import BotBorealis

try:
	print("Welcome to BOREALIS.")
	print("Initializing BOREALIS and its subcomponents.")
	bot = BotBorealis("config.yml")

	print("Initialization completed. Readying subcomponents.")
	bot.setup()

	print("Subcomponents ready. All systems functional.")
	print("Starting BOREALIS.")
	bot.start_borealis()
except Exception as e:
	print("Danger! Exception caught!")
	print(e)
	print("BOREALIS has been shut down.")
	print("Check the log for further details.")

input("Press Enter to exit.")

from borealis import BotBorealis
import time

while True:
	bot = None

	try:
		print("Welcome to BOREALIS.")
		print("Initializing BOREALIS and its subcomponents.")
		bot = BotBorealis("config.yml")

		print("Initialization completed. Readying subcomponents.")
		bot.setup()

		print("Subcomponents ready. All systems functional.")
		print("Starting BOREALIS.")
		bot.start_borealis()
	except Exception as e:
		print("Danger! Exception caught!")
		print(e)

	print("Deleting bot!")
	# Delete the bot, run it again.
	del bot

	# Sleep for a bit before restarting!
	time.sleep(60)
	print("Restarting loop.\n\n\n")

# Should never get here, but just in case.
print("We somehow exited the main loop. :ree:")
input("Press Enter to exit.")

Implement recovery Bot will now automatically restart after an exception is caught.
Implement recovery
Bot will now automatically restart after an exception is caught.

  from borealis import BotBorealis
+ import time
  
+ while True:
+ 	bot = None
- try:
- 	print("Welcome to BOREALIS.")
- 	print("Initializing BOREALIS and its subcomponents.")
- 	bot = BotBorealis("config.yml")
  
- 	print("Initialization completed. Readying subcomponents.")
- 	bot.setup()
+ 	try:
+ 		print("Welcome to BOREALIS.")
+ 		print("Initializing BOREALIS and its subcomponents.")
+ 		bot = BotBorealis("config.yml")
  
+ 		print("Initialization completed. Readying subcomponents.")
+ 		bot.setup()
- 	print("Subcomponents ready. All systems functional.")
- 	print("Starting BOREALIS.")
- 	bot.start_borealis()
- except Exception as e:
- 	print("Danger! Exception caught!")
- 	print(e)
- 	print("BOREALIS has been shut down.")
- 	print("Check the log for further details.")
  
+ 		print("Subcomponents ready. All systems functional.")
+ 		print("Starting BOREALIS.")
+ 		bot.start_borealis()
+ 	except Exception as e:
+ 		print("Danger! Exception caught!")
+ 		print(e)
+ 
+ 	print("Deleting bot!")
+ 	# Delete the bot, run it again.
+ 	del bot
+ 
+ 	# Sleep for a bit before restarting!
+ 	time.sleep(60)
+ 	print("Restarting loop.\n\n\n")
+ 
+ # Should never get here, but just in case.
+ print("We somehow exited the main loop. :ree:")
  input("Press Enter to exit.")
  
Implement recovery Bot will now automatically restart after an exception is caught.
## Code Before:
from borealis import BotBorealis

try:
	print("Welcome to BOREALIS.")
	print("Initializing BOREALIS and its subcomponents.")
	bot = BotBorealis("config.yml")

	print("Initialization completed. Readying subcomponents.")
	bot.setup()

	print("Subcomponents ready. All systems functional.")
	print("Starting BOREALIS.")
	bot.start_borealis()
except Exception as e:
	print("Danger! Exception caught!")
	print(e)
	print("BOREALIS has been shut down.")
	print("Check the log for further details.")

input("Press Enter to exit.")

## Instruction:
Implement recovery Bot will now automatically restart after an exception is caught.
## Code After:
from borealis import BotBorealis
import time

while True:
	bot = None

	try:
		print("Welcome to BOREALIS.")
		print("Initializing BOREALIS and its subcomponents.")
		bot = BotBorealis("config.yml")

		print("Initialization completed. Readying subcomponents.")
		bot.setup()

		print("Subcomponents ready. All systems functional.")
		print("Starting BOREALIS.")
		bot.start_borealis()
	except Exception as e:
		print("Danger! Exception caught!")
		print(e)

	print("Deleting bot!")
	# Delete the bot, run it again.
	del bot

	# Sleep for a bit before restarting!
	time.sleep(60)
	print("Restarting loop.\n\n\n")

# Should never get here, but just in case.
print("We somehow exited the main loop. :ree:")
input("Press Enter to exit.")
