I cant figure out how to send chat messages with socket.io-client
to /chat
I can listen for messages and login to the socket but it won’t send messages
Here
from wasteof import api
import os
os.system("pip install python-socketio[client]")
os.system("clear")
import socketio
sio = socketio.Client(logger=True)
api = api() #logsin
@sio.on('message')
def on_message(data):
print(data)
def connect():
sio.emit("message","by python")
print("I'm connected!")
sio.connect("https://api.wasteof.money/", auth= {"token":api.token})
I put Code tag…
from wasteof import api
import os
os.system("pip install python-socketio[client]")
os.system("clear")
import socketio
sio = socketio.Client(logger=True)
api = api() #logsin
@sio.on('message')
def on_message(data):
print(data)
@sio.event
def connect():
sio.emit("message","by python")
print("I'm connected!")
sio.connect("https://api.wasteof.money/", auth= {"token":api.token})
thanks again
Welcome!
thanks