TeamSpeak-3-Java-API icon indicating copy to clipboard operation
TeamSpeak-3-Java-API copied to clipboard

Send private message not working on newest ts

Open DevJoey opened this issue 5 years ago • 5 comments

Issues on Github are (mostly) meant for bug reporting and feature requests. For basic questions, please use our Gitter instead.

For bug reports, please include the debug log without any private information (login, etc.) by enabling communications logging and ensuring that DEBUG messages are being logged (enabled if you use the jar file, see here if you use Maven).

If i will send a player a private message with that code getTsapi().sendPrivateMessage(e.getClientId(), "Why you will not work");

the message is sendet. but if i try it again the teamspeeak says "Error: Invalid Client" and i must create a new query login to get this to work again. It i not possible to send more than one private message.

DevJoey avatar Feb 01 '20 18:02 DevJoey

Can you provide the code that is causing the issue?

TAXSET avatar Feb 03 '20 09:02 TAXSET

I have already provided the code getTsapi().sendPrivateMessage(e.getClientId(), "Why you will not work");

DevJoey avatar Feb 03 '20 13:02 DevJoey

e is the Join Event

DevJoey avatar Feb 03 '20 13:02 DevJoey

Can you provide me with the whole class in which you initialize the API? I honestly don't know what's causing the issue here as the method you are using definitely works fine for me. The only thing that could be causing it is an incorrect API setup.

TAXSET avatar Feb 03 '20 14:02 TAXSET

I can't really help you without seeing more of your code, and given the age of this issue, you probably either already solved it yourself.

But just in case: When sending messages, make sure you're not trying to send a message to a query client. Use Client#isRegularClient() to ensure it's a normal client you're trying to send a message to.

rogermb avatar May 05 '20 00:05 rogermb