Wrapped bot code in main function.