https://github.com/macpie/teamspeak-bot
https://github.com/macpie/teamspeak-bot
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/macpie/teamspeak-bot
- Owner: macpie
- License: mit
- Created: 2015-07-27T02:20:26.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-04-12T20:35:10.000Z (about 8 years ago)
- Last Synced: 2025-01-03T13:46:39.007Z (over 1 year ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# teamspeak-bot
## Run with docker
`docker run -v :/opt/teamspeak-bot/config.json -it --rm --name teamspeak-bot macpie/teamspeak-bot`
`docker run -v :/opt/teamspeak-bot/config.json -d --name teamspeak-bot macpie/teamspeak-bot`
## Functions
**AFK** will move any client idle for more then 2 hours to a specific channel (or default channel).
## Events
You can subscribe to events like
* `connected`/`disconnected` : bot connected/disconnected
* `afk` : bot moved client to afk channel
```javascript
bot.events.on('connected', function() {
console.log('bot connected!');
});
bot.events.on('disconnected', function() {
console.log('bot disconnected!');
});
bot.events.on('afk', function(client) {
console.log(client.client_nickname, + " moved!");
});
```
## Config
```json
// Rename to config.json
{
"host": "localhost", // Teamspeak server ip/hostname
"port": 10011, // Teamspeak server port
"server": 1, // Server id usually 1
"login": "admin", // ServerQuery login
"pwd": "password", // ServerQuery password
"botName": "TeamSpeak Bot", // Bot name
"afk": { // afk function
"channel": 13, // channel id to move afk clients to
"idle_time": 60 // idle time after client will be move (in minutes) default 60
}
}
```
## Usage
`npm start` start bot