arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a teamspeak music bot in linux & windows! [ 2 Different Methods ]
#1
Hey guys,
Today I'll be introducing two ways of making a music bot, one for windows and one for linux.The linux method can be applied on windows too but offers less functionality however It is still better than the method which we will use for windows, however I personally would recommend these methods for making a music bot

Linux Users


I'll show you how you can make a music bot for yourself which accepts commands ( !yt, !stop etc ) and has cool features such as automatic "Now Playing : Song" once a new song starts and you get a sexy online control panel too.

[Image link] https://i.gyazo.com/640d3e2fce8e54f6b3ff...653ee9.png

So basically, the program I use is called, or known as, Sinusbot. It's available for both, Linux as well as Windows Users and It's free! It's more easier to install on windows but most of the latest features are not yet available on windows and another downside is that It can only be run on Windows x64 so things are not pretty bright for the windows users but for linux users installing this is a piece of cake, For additional features that you can install on the bot, I'll make a seperate spoiler area under the main topic.

Alrighty, get your terminal out boys. ( and girls ) ( If you're using a VPS ignore this sentence ) Don't know what's that? better close this page then. Seriously. * jk Clicky *

Also if you want a easy and fast installation with every extensions like YT-DL you could also use this Automated Installer ( Only for linux again )

you can start by installing these dependencies, these for your bot's survival, ( actually for it to be born in the first place hehe ), just copy these commands and paste it in your terminal

apt-get install x11vnc xvfb libxcursor1 ca-certificates bzip2 -y
update-ca-certificates

If you're facing an error installing it, try apt-get update first so it can update itself.

alright if you're using a linux server you should be done in a few seconds, if you're doing it on your PC It shouldn't take too long in that case too.

People using Debian & Ubuntu will have to install this too
apt-get install libglib2.0-0

So, basically this bot is going to be installed in the directory, /opt/ts3soundboard but It isn't there yet ( yet. ).
using the main account ( root ) is dangerous, to do anything with it is dangerous actually. so we'll make a seperate user called "sinusbot" ( without quotes ofc ), to do so, use this command :
adduser sinusbot

After entering the command it will ask you for a password and then some personal information, There's no need to add personal information for the account, simply enter blanks into the personal field but make sure to insert a good pass and not leave that field empty.

Now that we're done with creating our user, dont switch to that user yet.Make the directory where our bot will rest, through these commands
mkdir -p /opt/ts3soundboard ( Makes the directory )
cd /opt/ts3soundboard ( Changes current directory to /opt/ts3soundboard )
wget https://www.sinusbot.com/pre/sinusbot-0.9.11-ee30ef7.tar.bz2 ( Downloads the file in the directory )

if you're getting an SSL Error try this command instead :

curl -O https://www.sinusbot.com/pre/sinusbot-0.9.11-ee30ef7.tar.bz2

Now once you're done with downloading the file, as you must've noticed by now, the file is compressed ( .tar.bz2), we need to uncompress the file and extract the bot so we can run it. we can do so through this command :
tar -xjf sinusbot-0.9.11-ee30ef7.tar.bz2

Next copy the config file so we can later edit the configurations easily.

cp config.ini.dist config.ini

As you must remember, we made a seperate user for our bot, we need to give access to this folder to that bot, we can do so by this command. if you're following my tutorial fully, then have no fear otherwise change the command according to your account's name. ( Change both sinusbot to ur acc's name )

chown -R sinusbot:sinusbot /opt/ts3soundboard

Once you're done, you need to get the TeamSpeak client itself which the bot will use to make itself connected to the teamspeak server.

wget http://dl.4players.de/ts/releases/3.0.18.2/TeamSpeak3-Client-linux_amd64-3.0.18.2.run ( Downloads the file )
chmod 0755 TeamSpeak3-Client-linux_amd64-3.0.18.2.run ( Gives the file permission to be executed/run )
./TeamSpeak3-Client-linux_amd64-3.0.18.2.run ( Runs the file )

Once you've done that, press enter again ( after entering the command ) and then enter q this is basically to accept the terms and conditions of teamspeak so it can begin the installation.

Once it's done installing, simply open this file ( config.ini ) from this command to check if  TeamSpeak's directory is correct.
nano config.ini

Make sure the TeamSpeak directory looks like this.

TS3Path = "/opt/ts3soundboard/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"

Close the editor (Ctrl+O, Enter, Ctrl+X).

And finally copy the plugin to the plugins-directory of the TeamSpeak-Installation

cp plugin/libsoundbot_plugin.so /opt/ts3soundboard/TeamSpeak3-Client-linux_amd64/plugins
chmod 755 sinusbot ( Enter this command seperately )

To run the bot, simply switch over to the account we made for the bot.
su sinusbot

and then use this command to run, ./sinusbot and to stop the bot
Ctrl + C

The bot will launch the TS3Client once and shut it down immediately. This is normal behavior, as this creates an initial configuration for the client. If you want to actually launch the bot, you'll have to do that from within the frontend, which is, the online control panel I told you guys about.

Simply open chrome, or whatever browser you guys use, and enter 127.0.0.1:8087, If you're using a server you'll have to access it by your server's IP address, such as 164.132.68.210:8087 ( It doesn't work so dont even try :p ) and then you'll be prompted to login with a screen like this,

[Image link] https://i.gyazo.com/58a262bc5292a550f222...4fc490.png

Simply enter the user admin and password foobar, yes you guessed it. It's default.

Once you successfully enter your control panel, Its recommended that you change your password so you dont get hacked by mlghackers hue hue

and then you've to make an instance, do so by going into the settings,  and there going into Instance Settings. There you can set the name to your bot's name, and set other settings as shown in the picture.

[Image link] https://i.gyazo.com/0a8949ea378d2c6607f5...2ac769.png

Once done with that, simply run your bot from the button placed on the upper right corner of your screen, It must be orange at that time. Once it becomes green give it a few seconds to connect and your bot shall appear in the default channel Smile

All the commands the bot features are :

[Image link] https://i.gyazo.com/6c8a304f6a76f479daf4...ca1f08.png


Windows Users

In this tutorial I'm going to teach you how to stream music through your own Music Bot on Windows ( not exactly a bot ).

Requirments :
  • VAC ( Virtual Audio Cables ) ( I'm not going to provide the links, Please use google! )
  • Windows ( As I do not have Mac, Can't make a Tut on That, Sorry )
  • TeamSpeak 3
  • Some Decent Skills !



Part 1 : Setting Up Your VAC
As a start, Make Sure You've enabled your Show Disabled Devices by right-clicking your recording area ( like this ) :

[Image link] http://i.gyazo.com/4ba979d0d646c1957f502f97c13ad1a8.png

So If you've installed VAC correctly, There should be a device called Line 1 in Playback and Recording. Before you do anything to them, Disable your Sterio Mix or there's going to be intense Echo !

Set Line 1 To Default Device on Recording and set your settings like this :

[Image link] http://i.gyazo.com/faa0939b19333742c0703dd55c73f138.png

Do not change other settings or it'll mess you up!

and Ladies and Gentlemen, Part 1 ends here !



Part 2 : Setting Up Your Windows Media Player

You may have to configure other Song Players yourselves since I'm only going to teach you on Windows Media Player !

So Open your Windows Media Player and Right Click on the top bar and click More Options :

[Image link] http://i.gyazo.com/9a7c4488ae4e4b4dd610b7180681b92a.png

Click The Devices Tab and then Click on Speakers ! :

[Image link] http://i.gyazo.com/b1a488e12359aafcabd7d1616561c591.png

Set your Device to This, Do not change other settings or I won't be responsible ! :

[Image link] http://i.gyazo.com/191009e2456ca11f1f57efb8b76cb424.png

and Part 2 Concludes !



Part 3 : Setting Up Your TeamSpeak

k, This part is the most complicated in my opinion, Get this right and You're mostly done !

Open your TeamSpeak, Goto Settings -> Options ! :

[Image link] http://i.gyazo.com/df93060ec9a83a2179269e5d4cbde896.png

and then Make a new Profile By Clicking the + button on the Lower Left Area ! :

[Image link] http://i.gyazo.com/4995514ad89fa3ab5d251216e0cdd220.png

You've to make one new profile in Capture and one new in Playback, Set their settings as follows :

Playback :

[Image link] http://i.gyazo.com/3b5676a46ac5dddc56260f5404faac8a.png

Capture :

[Image link] http://i.gyazo.com/8d4e3e2d5a9dadbc00ba830551097de5.png

Make sure to make these settings in your new profile and not in the default, If you're wondering, You can select your profiles from the left big white column !

And Part 3 Concludes !



Part 4 : Streaming Music on your TeamSpeak

To Connect through your Music Bot, Open Connections as you usually do to connect but change your profiles :

To Connect your Bot :

[Image link] http://i.gyazo.com/29929f744793853a535aeafc642e6a43.png

To Connect yourself :

[Image link] http://i.gyazo.com/1a620c9d48c522385f4ef7bf10d77f4b.png

Your  identity might be default, Use default in that case !

If you're here, You've almost completed all of the necessary things, You just need to stream your music now. To Stream music, Open any song ( Mp3 or Mp4 Doesn't matter ) in Windows Media Player and Don't forget to unmute your mic. You'll notice that you yourself aren't able to hear the song. If you want to hear it too, Rejoin the channel in a new tab with your default profile and everthing should be fine again !

If You find my tutorial useful, +1 as always Smile

If you think I missed something, Reply me and I'll add it!!

Regards !

EDIT : A Video has been added for those people who were facing issues on following this tutorial, I hope this will help you in completing your objective Smile






.
Thanks to ShadowHosting and Post4VPS for my VPS 5!
#2
Good tutorial but If you have transfer limit on VPS it can be difficult to host MusicBot. I was using SinusBot for 2 days with online radio and it used some transfer because I had problem with option "Play when idle" or something like that.
#3
If you have less bandwidth you would never host a site there xd but I didnt really notice it using much of my bandwidth, it hardly took 5-10 gb in a month
Thanks to ShadowHosting and Post4VPS for my VPS 5!


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting