Closed manuelp73 closed 5 years ago
You almost certainly set the flood rate to UNLIMITED
without being whitelisted. This caused the API to send commands too quickly, which is why the TS3 server banned you.
If you want to use the UNLIMITED
flood rate, you first need to add the IP of your server query client to the query_ip_whitelist.txt
file in the root directory of your TS3 server. More details about that whitelist can be found on page 6 of the server query manual, which you can also find in your TS3 install directory at docs/ts3_serverquery_manual.pdf
. 😃
And how should I change the FloodRate?
Huh, so you didn't change the flood rate and got banned using the default settings? How strange!
Anyway, you need to use ts3Config.setFloodRate
to set the flood rate to anything other than the 350ms-per-command default value. There's FloodRate.UNLIMITED
, which means no delay between commands at all (but you really need to be whitelisted), or FloodRate.custom(delayInMilliseconds)
for when your TS3 server uses some custom flood rate settings.
Ok, I've done it now.
If the code is correct, it will not work for me:
@Override
public void onClientJoin(ClientJoinEvent clij) {
Client c = api.getClientInfo(clij.getClientId());
api.sendPrivateMessage(c.getId(), "Herzlich Wilkommen " + c.getNickname() + " auf dem TS3 Server.");
}
This code looks correct. What about it doesn't work? Is there anything in the log file about it?
The bot works but the text is not output.
Did you add your listener using TS3Api#addTS3Listeners(TS3Listener)
and register the events e.g. using TS3Api#registerAllEvents()
?
When I start the bot comes this error message:
What have I done wrong?