def main(): while True: bot = AutoReiv() bot.load() try: bot.run(config.get('login'), config.get('password')) except Exception as e: print('* Crashed with error: {}'.format(e)) finally: print('* Disconnected.') asyncio.set_event_loop(asyncio.new_event_loop()) print('* Waiting 10 seconds before reconnecting (press ^C to stop)...') try: time.sleep(10) except KeyboardInterrupt: break
def __init__(self): print('* Starting up...') super().__init__() self.plugins = [] self.trigger = config.get('trigger')