All Projects → schroffl → alfred-teamspeak

schroffl / alfred-teamspeak

Licence: MIT license
Teamspeak 3 Bot Module for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to alfred-teamspeak

tvoip
Terminal-based P2P VoIP application (TeamSpeak-/Skype-like voice chatting over LAN or Internet)
Stars: ✭ 34 (+142.86%)
Mutual labels:  teamspeak
ts3updater
TeamSpeak 3 Server Installer and Updater
Stars: ✭ 64 (+357.14%)
Mutual labels:  teamspeak
JustAnotherVoiceChat
TeamSpeak 3 plugin to control 3D voice communication in games
Stars: ✭ 21 (+50%)
Mutual labels:  teamspeak
saltychat-altv
AltV implementation of Salty Chat (TeamSpeak 3 based Voice Plugin) using Typescript & C#
Stars: ✭ 20 (+42.86%)
Mutual labels:  teamspeak
TeamSpeak3QueryApi
.NET wrapper for the TeamSpeak 3 Query API
Stars: ✭ 56 (+300%)
Mutual labels:  teamspeak
ts3admin.class
The ts3admin.class is a powerful api for communication with Teamspeak 3 Servers from your website! Your creativity knows no bounds!
Stars: ✭ 107 (+664.29%)
Mutual labels:  teamspeak
JustAnotherVoiceChat-Server
Server for the JustAnotherVoiceChat TeamSpeak 3 plugin
Stars: ✭ 17 (+21.43%)
Mutual labels:  teamspeak
lgsl
LGSL v6.2.0 for PHP 5.4-8.2.0dev (Live Game Server List): online status for Discord, FiveM, Rust, CS, SA:MP, GMOD, Minecraft, Source Query, etc.
Stars: ✭ 101 (+621.43%)
Mutual labels:  teamspeak
ts3exporter
Teamspeak 3 exporter for prometheus
Stars: ✭ 25 (+78.57%)
Mutual labels:  teamspeak
teamspeak-dark
A dark theme for TeamSpeak 3 which looks surprisingly similar to another popular voice communication software.
Stars: ✭ 50 (+257.14%)
Mutual labels:  teamspeak
TeamCord
Cross voice communication between Teamspeak and Discord
Stars: ✭ 35 (+150%)
Mutual labels:  teamspeak
saltychat-fivem
FiveM implementation of Salty Chat (TeamSpeak 3 based Voice Plugin)
Stars: ✭ 64 (+357.14%)
Mutual labels:  teamspeak
TS3ServerStatusViewer
TeamSpeak 3 Server Status Viewer is a simple status dashboard powered by PHP.
Stars: ✭ 16 (+14.29%)
Mutual labels:  teamspeak
teamspeak-client-portable
🚀 TeamSpeak Client portable for Windows
Stars: ✭ 21 (+50%)
Mutual labels:  teamspeak
TeamSpeak3-Client
TeamSpeak3 Client package for Debian/Ubuntu
Stars: ✭ 14 (+0%)
Mutual labels:  teamspeak
docker
🐳 Official Docker image of the SinusBot for TeamSpeak 3 and Discord.
Stars: ✭ 50 (+257.14%)
Mutual labels:  teamspeak
ts3j
An open-source Java Teamspeak 3 client library using the TS3 full client protocol
Stars: ✭ 84 (+500%)
Mutual labels:  teamspeak
figaro
Real-time voice-changer for voice-chat, etc. Will support many different voice-filters and features in the future. 🎵
Stars: ✭ 362 (+2485.71%)
Mutual labels:  teamspeak
rust-ts3plugin
Rust bindings to easily create a TeamSpeak3 plugin
Stars: ✭ 13 (-7.14%)
Mutual labels:  teamspeak

Alfred npm version

A Teamspeak 3 Bot Module utilizing the Teamspeak ServerQuery

Installation

$ npm install alfred-teamspeak

Example

const Alfred = require('alfred-teamspeak');
const bot = new Alfred();

bot.login('username', 'password')
	.then(() => console.log('Connected!'))
    .catch(err => console.error(err));
    
bot.on('cliententerview', data => console.log(data.client_nickname, 'connected!'));

Options

Options are passed via an object on construction: new Alfred({ ... })

Name Default Description
name Alfred The name of the bot
host 127.0.0.1 The IP to connect
port 10011 The query port of the server
sid 1 The ID of the Virtual Server

Methods

Alfred.login(username, password)

Login with the specified name and password. Returns a promise which is being resolved on successful login and rejected on failure.

Alfred.send( ... )

Inherited from schroffl/teamspeak-query.

Alfred.set(key, value)

Set a variable.

Alfred.get(key)

Get the value of a variable.
NOTE: After the login you can use Alfred.get('clid') to obtain the ID of the bot.

Alfred.use(event, callback)

Mount the specified callback function to the given event. If event is omitted, the handler will be called for any event.

Middleware

As already said, middleware can be mounted via Alfred.use and may or may not only be used for a specific event such as cliententerview.
Whenever an event occurs, the stack for it will be called with the data the server has given. After the stack has finished, the event will be emitted. So Alfred.on('cliententerview', ...) will be fired when all the middleware has processed the data.
If you want to create your own middleware, take a look at Creating Middleware.
An example can be found here: lib/user.js

User Middleware

Alfred already ships with a package that offers an interface to easily interact with users. You can include like this:

const Alfred = require('alfred-teamspeak');
const User = Alfred.User;
const Builder = Alfred.Builder; // Message Builder

const bot = new Alfred();

// Message Builder
let msg = new Alfred.Builder('Message: ').bold('my bold text').empty()
            .text('with').color('#ff0000', 'some red stuff').text('.').empty()
            .text("made by").empty().url("https://github.com/iHDeveloper", Builder.bold("iHDeveloper"));

bot.use(User);
// [...]

So now if anyting user-related happens, you can respond to the users as easy as:

bot.on('cliententerview', data => data.user.respond('Hello', data.user.get('name')) );

Further documentation of the package can be found :

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].