These are chat archives for TheHolyWaffle/TeamSpeak-3-Java-API

18th
Oct 2016
Captaln
@Captaln
Oct 18 2016 09:42

After I implement the "new" api I needed to change some settings like the examples and now my bot doesn't connect anymore to my server. He ignores the onConnect method
```public void startReconnect(BotInstance botInstance){
this.botInstance = botInstance;
config.setReconnectStrategy(ReconnectStrategy.exponentialBackoff());

    // Make stuff run every time the query (re)connects
    config.setConnectionHandler(new ConnectionHandler() {

        @Override
        public void onConnect(TS3Query ts3Query) {
            everyReconnect(ts3Query.getApi());
        }

        @Override
        public void onDisconnect(TS3Query ts3Query) {
            System.out.println("Disconnected");
        }
    });
    query.connect();
    botInstance.startConfig();
}```

Can you please help? I get no errors here only in other method because my api is null.

Roger Baumgartner
@rogermb
Oct 18 2016 09:43
Are you sure that startReconnect even gets called?
Captaln
@Captaln
Oct 18 2016 09:59
yes
When I do an System.out.print with text before config.setConnectionHandler then it print it out
Roger Baumgartner
@rogermb
Oct 18 2016 10:02
Huh, weird. The reconnect example still works on my machine, so it probably isn't the API's fault
Could it be that you're also calling query.connect() before the startReconnect method gets called?
Captaln
@Captaln
Oct 18 2016 10:04
query.connect is only called there
I only changed this method for the api
Roger Baumgartner
@rogermb
Oct 18 2016 10:06
Ooh, I know what it is
I think
You're changing the config object after you've already created the TS3Query instance
Captaln
@Captaln
Oct 18 2016 10:07
I also send you the whole class in private
Roger Baumgartner
@rogermb
Oct 18 2016 10:07
You 're supposed to make all modifications to TS3Config before you create the TS3Query object
Captaln
@Captaln
Oct 18 2016 10:09
Is it new?
Now he connects yeah
Roger Baumgartner
@rogermb
Oct 18 2016 10:21
Shouldn't be new, no. It might've just been inconsistent behavior, though ^^
dekros987
@dekros987
Oct 18 2016 11:05
i have problem when bot connect to ts3
after connection <13:04:52> "ᴮᴼᵀ" disconnected (deselected virtualserver)
ok i fix this problem
i change api from 1.0.11 to 1.0.13 and bot i slower;/ creating 50 channel on 1.0.11 takes 5sec on 1.0.13 takes 7sec
Roger Baumgartner
@rogermb
Oct 18 2016 11:10
For faster UNLIMITED speeds, you'll need to upgrade to a snapshot build, not just the latest release
dekros987
@dekros987
Oct 18 2016 11:11
can you give me link?
to jar?
Roger Baumgartner
@rogermb
Oct 18 2016 11:11
dekros987
@dekros987
Oct 18 2016 11:11
thx i will test
debug: Creating 50 Channels: 2500ms
2 times faster xD
when i try reconnect bot:
[2016-10-18 13:13:44.727] [WARNING] Connection closed by the server.
[2016-10-18 13:13:44.728] [WARNING] SocketReader has stopped!
[2016-10-18 13:13:44.729] [SEVERE] [Connection] Disconnected from TS3 server
ohh
ts3 ban my bot xDD
for floud
flood*
Roger Baumgartner
@rogermb
Oct 18 2016 11:35
That happens if you're using UNLIMITED flood rate settings without whitelisting the IP of the query :P
dekros987
@dekros987
Oct 18 2016 11:35
yea i know i add ip to whitelist
creating 20channels per second is nice but still slower than php bot xD
Roger Baumgartner
@rogermb
Oct 18 2016 11:36
That just due to the ping to your server
If you were to use the asynchronous API, the commands would all get sent at once and your commands would be executed even faster