teamspeak-simple
v0.0.2-r1
Published
Simple Teamspeak Query for NodeJS
Downloads
5
Readme
teamspeak-simple
TeamSpeak-Simple is a simple TS3 Query for NodeJS
Connect:
const query=require("teamspeak-simple");
const cl=new query("127.0.0.1",{client_login_name: "###USERNAME###", client_login_password: "###PASSWORD###"},function(err,cl) {
//Place your code here
});
List all Servers:
console.log(cl.servers);
List all Users on a Server:
cl.getId(sid,function(err,server) {
console.log(server.users.users);
});
Move Users:
cl.getId(sid,function(err,server) {
server.users.getId(clid,function(err,user) {
user.move(server.channels.channels[0].cid);
});
});
Kick/Ban Users:
cl.getId(sid,function(err,server) {
server.users.getId(clid,function(err,user) {
user.kick("Kicked by TeamSpeak-Simple");
user.ban(60,"Banned by TeamSpeak-Simple");
});
});