INNER CODE UNIT · Python

on_disconnected

zapek/Xeres · scripts/bot/bot.py:199

	def on_disconnected(self):
		print('disconnected')


def handle_chat(own_id):
	conn = stomp.WSStompConnection([(XERES_API_HOST, XERES_API_PORT)], ws_path='/ws')
	conn.set_listener('', StompListener(conn, own_id))
	connect_and_subscribe(conn)
	while True:
		time.sleep(60)


def handle_incoming_room_message(conn, own_id, destination_id, room_id, sender, gxs_sender, content):
	own_nickname = own_id['name'].lower()

	# We need to do that because what we say in the room is echoed back, obviously
	if gxs_sender == own_id['gxsId']['bytes']:
		return

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…