You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to run the "say hello to all clients" example code. for some reason when I try to run the code, I get the following error:
ts3.query.TS3QueryError: error id 516: invalid client type
Thats the Code im using:
import ts3
with ts3.query.TS3ServerConnection("telnet://serveradmin:Z0YxRb7u@localhost:10011") as ts3conn:
ts3conn.exec_("use", sid=1)
for client in ts3conn.exec_("clientlist"):
msg = "Hi {}".format(client["client_nickname"])
ts3conn.exec_("clientpoke", clid=client["clid"], msg=msg)
I only replaced the login credentials. Is there something im missing?
The text was updated successfully, but these errors were encountered:
Without testing it, the following seems to be the issue:
You are looping through all clients.
This means that you will also loop over server query clients, including "yourself".
My guess is your bot is trying to poke itself or another server query.
Queries have the client_type 1, so try a condition like: client["client_type"] == "0"
This evaluates to True when a client is a normal user and not a server query.
I hope someone sees this.
Im trying to run the "say hello to all clients" example code. for some reason when I try to run the code, I get the following error:
ts3.query.TS3QueryError: error id 516: invalid client type
Thats the Code im using:
I only replaced the login credentials. Is there something im missing?
The text was updated successfully, but these errors were encountered: