»How to make a music bot? :o [REMAKE]

Discussion in 'Tutorials' started by Honey, May 10, 2016.

  1. Honey

    Honey Addict Member

    Messages:
    184
    Ratings:
    +119 / -0
    Hello Dear Guildcrafters,

    This is probably my last tutorial to Guildcraft, So I hope I can make it as informative as I can, basically 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 ( ͡° ͜ʖ ͡°)( ͡⊙ ͜ʖ ͡⊙) ( ͡◉ ͜ʖ ͡◉)

    [​IMG]

    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.
    So if you're a windows user you better scroll down, yes I know I could've made spoilers.



    ___________________________________________________________________________


    -=-=-=-=-=-=-=-
    = Linux Users =
    -=-=-=-=-=-=-=-


    Alrighty, get your terminal out boys. ( and girls ) Don't know what's that? better close this page then. Seriously. * jk Get a free cookie*

    Also if you want a easy and fast installation with every extensions like YT-DL you could also use this 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

    Code:
    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
    Code:
    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 :
    Code:
    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
    Code:
    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 :

    Code:
    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 :
    Code:
    tar -xjf sinusbot-0.9.11-ee30ef7.tar.bz2
    Next copy the config file so we can later edit the configurations easily.

    Code:
    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 )

    Code:
    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.

    Code:
    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.
    Code:
    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

    Code:
    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.
    Code:
    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.220:8087 ( It doesn't work so dont even try :p ) and then you'll be prompted to login with a screen like this,

    [​IMG]

    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 @TrueBacca6 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.

    [​IMG]

    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 :)

    All the commands the bot features are :
    [​IMG]

    That's it for now, I know I haven't started the windows part yet but I will soon! so stay tuned and give positive response pl0x ;-;
     
    #1
  2. Pretty

    Pretty Forum Veteran Member

    Messages:
    1,425
    Ratings:
    +736 / -0
    thx honey! but can u make te window's one as soon as possible? :3
     
    #2
  3. _XxMossyV2xX_

    _XxMossyV2xX_ Enthusiast Member

    Messages:
    125
    Ratings:
    +38 / -0
    Yeh im pretty sure i am understand with the codes etc

    ^ik im dumb.
     
    #3
  4. cl0se5

    cl0se5 MoB Member

    Messages:
    2,392
    Ratings:
    +712 / -0
    Great tutorial thanks so much honey ;)
    Also lmao linux users are having a hard time xD
     
    #4
  5. minion325

    minion325 Developer Member

    Messages:
    736
    Ratings:
    +249 / -0
    How to make it on a VPs like yours?
     
    #5

Share This Page