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

17th
Oct 2016
dekros987
@dekros987
Oct 17 2016 17:37
is better to use getAsynsApi than getApi?
maybe is faster?
Roger Baumgartner
@rogermb
Oct 17 2016 18:43
If you don't have any experience with asynchronous computations, just use the synchronous one
There are some specific advantages over the synchronous API, but the asynchronous API is orders of magnitudes harder to use and generates much more boilerplate code. Seriously, only use the asynchronous API if you know exactly what you're doing.
dekros987
@dekros987
Oct 17 2016 18:48
is any way to speed up bot? creating 50 channel take ~5sec
Roger Baumgartner
@rogermb
Oct 17 2016 18:48
Are you using the unlimited flood rate setting?
dekros987
@dekros987
Oct 17 2016 18:49
    config.setFloodRate(TS3Query.FloodRate.UNLIMITED);
and method to create channels:
Map<ChannelProperty, String> prop = new HashMap<>();
prop.put(ChannelProperty.CHANNEL_FLAG_PERMANENT, "1");
prop.put(ChannelProperty.CPID, "2");
prop.put(ChannelProperty.CHANNEL_FLAG_MAXCLIENTS_UNLIMITED, "0");
prop.put(ChannelProperty.CHANNEL_MAXCLIENTS, "0");
Long start = System.currentTimeMillis();
for (int i = 0; i < 50; i++) {
api.createChannel(i + "", prop);
}
Roger Baumgartner
@rogermb
Oct 17 2016 18:51
If you really need this process to be any faster, switch to a snapshot build of the API.
In a recent change, we've made the unlimited setting much, much faster than before
dekros987
@dekros987
Oct 17 2016 18:54
hmm is stable?
Roger Baumgartner
@rogermb
Oct 17 2016 18:55
Stable enough for most practical purposes :stuck_out_tongue:
dekros987
@dekros987
Oct 17 2016 19:09
i will check
how to set query login and pass?
config.setLoginCredentials not work xD and api.moveClient
Roger Baumgartner
@rogermb
Oct 17 2016 19:11
Wow, you were on a really old version of the API O.o
just use api.login
dekros987
@dekros987
Oct 17 2016 19:12
yea 1.011
Roger Baumgartner
@rogermb
Oct 17 2016 19:12
If you intend to move the query, use api.moveQuery
Names actually try to make sense now :P
dekros987
@dekros987
Oct 17 2016 19:13
yea xD
now i have a lot of errors xD
Roger Baumgartner
@rogermb
Oct 17 2016 19:14
Wanna send me a screenshot so I can try to help?
Startmenu, "Snipping Tool", create a screenshot, hit the copy button and paste it here in gitter :D
dekros987
@dekros987
Oct 17 2016 19:15
login to server: http://scr.hu/1det/s6ng8
and creating channels http://scr.hu/1det/4u3qq
Roger Baumgartner
@rogermb
Oct 17 2016 19:16
Gitter has file-sharing built in :/
Just FYI :P
So where's the problem? I don't see any errors :D
dekros987
@dekros987
Oct 17 2016 19:17
i fix all errors but this code i sent is good?
Roger Baumgartner
@rogermb
Oct 17 2016 19:17
Looks good, yeah ^^
dekros987
@dekros987
Oct 17 2016 19:18
i will check this after i reinstall ts3 xD
Captaln
@Captaln
Oct 17 2016 21:51
What is the latest java api? 1.0.13?
Roger Baumgartner
@rogermb
Oct 17 2016 21:52
That's the latest release, yes. There have been a few commits that were made after that release, though.