示例#1
0
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
示例#2
0
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
示例#3
0
	def __init__(self):
		print('* Starting up...')
		super().__init__()

		self.plugins = []
		self.trigger = config.get('trigger')