TheHolyWaffle / TeamSpeak-3-Java-API

A Java wrapper of TeamSpeak's 3 server query API.
MIT License
306 stars 107 forks source link

Can't send Text Messages #281

Closed Finnlife closed 6 years ago

Finnlife commented 6 years ago

When i send a Text Message to an client or in the Serverchat. The Bot dosent do that. There is no Error or something like that. I use the jar and not Maven. Here the Easy Code: https://pastebin.com/PUqBM3kt Can Somebody helps me? Could the Problem be the Server? The Server Version is Linux/3.3.0

rogermb commented 6 years ago

You need to create and modify the TS3Config object before passing it to TS3Query's constructor. After that, there's no reason to hang onto that TS3Config object.

i.e. first try

public static TS3Query query;
public static TS3Api api;

public static void main(String[] args) {
    TS3Config cfg = new TS3Config();
    cfg.setHost("127.0.0.1");
    [etc...]

    query = new TS3Query(cfg);
    query.connect();

    api = query.getApi();
    [etc...]

If that doesn't solve your issue, turn on communications logging cfg.setEnableCommunicationsLogging(true) and report back with that comms log :smiley:

Finnlife commented 6 years ago

It didnt solve it. I made an new Code to Test more send types: https://pastebin.com/b843MTrB

And here the Log: http://prntscr.com/kgs5w5

rogermb commented 6 years ago

And you're sure that you're connecting to the same TS3 virtual server with both your client and your server query? Because just by looking at the communications log, it seems that all commands are executed without any issues. You're even getting event notifications about these messages back from the server.

When editing your bookmarks in your TS3 client, there's a checkbox called "Show ServerQuery Clients". If you check that checkbox and re-connect to your server using that bookmark, you should now see any online server query clients. If your client doesn't show up when you run your program, you're most likely not on the same server 😄

Finnlife commented 6 years ago

Yes im sure, because when i use not the Serveradmin account, its working! And the Function from Teamspeak with Serverquery-Clients only works with other Accounts, (Not serveradmin)

rogermb commented 6 years ago

Well at least on my machine, it also shows the serveradmin account:

image

(Tested on the newest client version and the 3.3.0 server version on Windows - but I'm almost certain that's neither a new nor an operating system dependent feature)

Finnlife commented 6 years ago

By virtue of you,re Message i reinstalled my Client and now the Bot ist working. But i dont now why. Because other useres have the same Problem. But the Admin-Ouery are not visible. Thank you fpr the Support

rogermb commented 6 years ago

Huh, strange. At least it's working now, I guess 😄 And you're welcome!

Closed