master | develop |
---|---|
This is our open-source TeamSpeak 3 audiobot project since
we haven't found any other open-source one so far.
The bot has come a long way is pretty stable by now, though somtimes he hangs up or needs some other maintenance.
For now I'd only recomment this bot on small servers since it doesn't cover any more complex right systems and relies on discipline.
The TS3AudioBot connects with at least 1 TeamSpeak3 Client instance wich allows you to:
- issue commands to that instance.
- play music for your channel.
- tell him to stream to different Channels and/or Users simultaneously with TeamSpeak's whisper feature.
We use a self written TeamSpeak3 Client which gives us very low memory and cpu usage.
About 65MB Ram with 1700+ songs in history indexed
And 4-6% CPU usage on a single shared vCore from a Intel Xeon E5-1650 v2 @ 3.50GHz
Done:
- Extract Youtube and Soundcloud songs as well as stream Twitch
- Extensive history manager, including features like:
- getting the last x played songs
- get last x songs played by a certain user
- start any once played song again via id
- search in title from played songs
- (planned) combined search expressions
- (un)subscribe to the Bob to hear music in any channel
- (un)subscribe the Bob to certain channels
- Playlist management for all users
- broken | Basic plugin support
In progress:
- Web API
In planning:
- Create multiple client instances automatically for diffrent channels
- (Improved) Rights system
- Own web-interface
All in all, the bot is fully operable only via chat (and actually only via chat).
Commands are invoked with !command.
Some commands have restrictions, like they can only be used in a private chat, only in public chat, or need admin rights.
For the full command list and tutorials see here in the wiki
If the bot can't play some youtube videos it might be due to some embedding restrictions, which are blocking this.
You can add a youtube-dl binary or source folder and specify the path in the config to try to bypass this.
- Any C# Compiler (
Visual Studio
ormono 5.0.0+
andmsbuild
) - (Linux only) A C Compiler for Opus
Before we start: If you know what you are doing you can alternatively compile each depenency referenced here from source/git by yourself, but I won't add a tutorial for that.
Download the git repository with git clone https://github.com/Splamy/TS3AudioBot.git
.
- See if you have NuGet by just executing
nuget
. If not, getNuGet.exe
withwget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- Go into the directory of the repository with
cd TS3AudioBot
- Execute
nuget restore
ormono ../Nuget.exe restore
to download all dependencies - Execute
msbuild /p:Configuration=Release /p:Platform=x86 TS3AudioBot.sln
to build the C# AudioBot - Make the Opus script runnable with
chmod u+x InstallOpus.sh
and run it with./InstallOpus.sh
- Get the ffmpeg 32bit or 64bit binary.
- Extract the ffmpeg archive with
tar -vxf ffmpeg-git-XXbit-static.tar.xz
- Get the ffmpeg binary from
ffmpeg-git-*DATE*-64bit-static\ffmpeg
and copy it toTS3AudioBot/bin/Release/
- Build the C# AudioBot with Visual Studio.
- Download the latest libopus file from here
- Open the archive and copy the file from
opusfile-0.7-win32\libopus-0.dll
, move and rename it toTS3AudioBot\bin\Release\libopus.dll
- Get the ffmpeg 32bit or 64bit binary.
- Open the archive and copy the ffmpeg binary from
ffmpeg-latest-winXX-static\bin\ffmpeg.exe
toTS3AudioBot\bin\Release\
- Create a group for the AudioBotAdmin with no requirements (just ensure a high enough
i_group_needed_member_add_power
). - Create a privilige key for the ServerAdmin group (or a group which has equivalent rights).
- The first time you'll need to run
mono TS3Audiobot.exe
without parameter and it will ask you a few questions. (You can get ServerGroupIds in the rights window.) - Send the bot in a private message
!bot setup <key>
where<key>
is the privilege key from a previous step. - Now you can move the process to the backgroud or close the bot with
!quit
in teamspeak and run it in the background.
The recommended start from now on ismono TS3AudioBot.exe -q
to disable writing to stdout since the bot logs everything to a log file anyway. - Congratz, you're done! Enjoy listening to your favourite music, experimenting with the crazy command system or do whatever you whish to do ;).
For further reading check out the CommandSystem
- Run the TS3ABotUnitTests project in Visual Studio or Monodevelop.