npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

teamspeakbot

v0.0.7

Published

A TeamSpeak bot in javascript to manage playing audio and music using commands

Downloads

7

Readme

TeamSpeakBot

NPM-Version

License

A TeamSpeak bot in javascript to manage playing audio and music using commands.

Introduction

If you've come here because a bot is already running and you want to know how to use it, click here for the list of commands.
The rest of this README will assume that you need help getting the bot itself up and running.

Note: This bot is not a TeamSpeak client itself. You have to have one running alongside it.

The way TeamSpeakBot works is by plugging into the ClientQuery interface of an existing client. Audio is played to the default playback device and you are expected to loop that back through your client's recording device in your setup.

The bot can play audio from any mp3 or youtube URL. You also have commands for volume, seek and speed control.

There are also certain user defined commands that can be modified as necessary. The default ones provided will cover your needs when it comes to all the edgy dank memes.

Setting up

First install TeamSpeakBot with npm

$ npm install -g teamspeakbot

Change permission of youtube-dl binary (You currently have to do this to play youtube urls unless you're cloning or installing locally. I've submitted an issue in the meantime expressing my frustration at this requirement)

$ sudo chmod 755 /usr/local/lib/node_modules/teamspeakbot/node_modules/youtube-dl/bin/youtube-dl

Finally run TeamSpeakBot on the command line

$ teamspeakbot

You can also clone this repository and run bot.js with node. Whatever works for you. (Make sure to install dependencies in this case with npm install)

Next, you need to install mpv which is the software that will be invoked to play all the audio. Installing just the command line version will work fine.

The default keyboard shortcuts to seek in mpv is the left and right keys, but unfortunately those are hard to pipe via stdin, so we need to remap it to something else more convenient. Look through mpv's documentation and figure out how to edit/create the input.conf file for mpv. (For linux, it should be: ~/.mpv/input.conf) The following should be the contents of that file:

g seek  5
a seek -5

After that, you need to configure your machine's audio devices such that audio coming out of mpv is redirected as the input for your TeamSpeak client.

  • Windows has something called Stereo Mix that turns audio output into input. Look it up first, learn how to enable it, and change your TeamSpeak client's capture/recording settings to use that interface.
  • If you are running a headless linux server via ssh, you need to configure pulseaudio and you're pretty much done. (Also note, if you're running headless, you will need to run your TeamSpeak client with a virtual framebuffer like Xvfb, otherwise it will not load).
  • If neither of those are right for you, feel free to use any Virtual Audio Cable software. This is however slightly harder since you will need or configure your virtual devices appropriately, tell mpv to output to that device, and reflect the same on your TeamSpeak client's settings.

That's it. Run a command and see if it works. If it does not, fix it yourself. This is something I made for my convenience, not yours. If you really want support, write a petition to the TeamSpeak developers to not code like a bunch of cunts and I'll turn this into a community project. You see all that bullshit confuration you had to do above to run a simple bot? Yeah that's all their fault for providing zero support for external development apart from a half baked ClientQuery protocol that's so old, it's almost reached the age of consent.

Also note that support for youtube playback is a bit flaky. It uses youtube-dl behind the scene as a npm dependency and it needs to be up to date. If you do not constantly keep updating to the latest version, the urls may not play whenever youtube changes its structure or protocols.

If you don't want to use mpv, you can edit commands/play.js if you'd like to use something else. You will also have to change the shortcuts used in seek.js, speed.js and volume.js in the playing directory.