7.7 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	Setting Up NadekoBot on OSX
Prerequisites
- Homebrew
 - Google Account
 - Soundcloud Account (if you want soundcloud support)
 - Text Editor (TextWrangler, or equivalent) or outside editor such as Atom
 
####Installing Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run brew update to fetch the latest package data.
####Installing dependencies
brew install git
brew install ffmpeg
brew update && brew upgrade ffmpeg
brew install openssl
brew install opus
brew install opus-tools
brew install opusfile
brew install libffi
brew install libsodium
brew install tmux
####Installing .NET Core SDK
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/- Download the .NET Core SDK
 - Open the 
.pkgfile you downloaded and install it. ln -s /usr/local/share/dotnet/dotnet /usr/local/bin
####Check your FFMPEG
In case your FFMPEG wasnt installed properly (Optional)
brew options ffmpegbrew install ffmpeg --with-x --with-y --with-zetc.brew update && brew upgrade(Update formulae and Homebrew itself && Install newer versions of outdated packages)brew prune(Remove dead symlinks from Homebrew’s prefix)brew doctor(Check your Homebrew installation for common issues)- Then try 
brew install ffmpegagain. 
####Installing xcode-select
Xcode command line tools. You will do this in Terminal.app by running the following command line:
xcode-select --install
A dialog box will open asking if you want to install xcode-select. Select install and finish the installation.
####Downloading and building Nadeko
Use the following command to get and run linuxAIO.sh:
(Remember DO NOT rename the file linuxAIO.sh)
cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/master/linuxAIO.sh && bash linuxAIO.sh
Follow the on screen instructions:
- To Get the latest build. (most recent updates)
 - To Get the stable build.
 
Choose either 1 or 2 then press enter key.
Once Installation is completed you should see the options again.
Next, choose 5 to exit.
####Creating and Inviting bot
- Read here how to create a DiscordBot application
 - Visual Invite Guide NOTE: Client ID is your Bot ID
 - Copy your 
Client IDfrom your applications page. - Replace the 
12345678in this linkhttps://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303with yourClient ID. - The link should now look like this: 
https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID_HERE**&scope=bot&permissions=66186303. - Go to the newly created link and pick the server we created, and click 
Authorize. - The bot should have been added to your server.
 
####Setting up Credentials.json file
- Open up the 
NadekoBotfolder, which should be in your home directory, thenNadekoBotfolder thensrcfolder and then the additonalNadekoBotfolder. - EDIT it as it is guided here: Setting up credentials.json
 - If you already have Nadeko 1.0 setup and have 
credentials.jsonandNadekoBot.db, you can just copy and paste thecredentials.jsontoNadekoBot/src/NadekoBotandNadekoBot.dbtoNadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data. - If you have Nadeko 0.9x follow the Upgrading Guide
 
####Setting NadekoBot Music
For Music Setup and API keys check Setting up NadekoBot for Music and JSON Explanations.
####Running NadekoBot
- Using tmux
 
tmux new -s nadeko
^this will create a new session named “nadeko”
(you can replace “nadeko” with anything you prefer and remember its your session name).
- Using Screen
 
screen -S nadeko
^this will create a new screen named “nadeko”
(you can replace “nadeko” with anything you prefer and remember its your screen name).
- Start Nadeko using .NET Core:
 
cd ~ && bash linuxAIO.sh
From the options,
Choose 3 To Run the bot normally.
NOTE: With option 3 (Running Normally), if you use .die command in discord. The bot will shut down and will stay offline untill you manually run it again. (best if you want to check the bot.)
Choose 4 To Run the bot with Auto Restart.
NOTE: With option 4 (Running with Auto Restart), bot will auto run if you use .die command making the command .die to be used as restart.
NOTE: To stop the bot you will have to kill the session.
Now check your Discord, the bot should be online
Now time to move bot to background and to do that, press CTRL+B+D (this will detach the nadeko session using TMUX) If you used Screen press CTRL+A+D (this will detach the nadeko screen)
####Updating Nadeko
- Connect to the terminal.
 tmux kill-session -t nadeko(don't forget to replace nadeko in the command to what ever you named your bot's session)- Make sure the bot is not running.
 tmux new -s nadeko(nadeko is the name of the session)cd ~ && bash linuxAIO.sh- Choose either 
1or2to update the bot with latest build or stable build respectively. - Choose either 
3or4to run the bot again with normally or auto restart respectively. - Done. You can close terminal now.
 
####Some more Info
TMUX
- If you want to see the sessions after logging back again, type 
tmux ls, and that will give you the list of sessions running. - If you want to switch to/ see that session, type 
tmux a -t nadeko(nadeko is the name of the session we created before so, replacenadekowith the session name you created.) - If you want to kill NadekoBot session, type 
tmux kill-session -t nadeko 
Screen
- If you want to see the sessions after logging back again, type 
screen -ls, and that will give you the list of screens. - If you want to switch to/ see that screen, type 
screen -r nadeko(nadeko is the name of the screen we created before so, replacenadekowith the screen name you created.) - If you want to kill the NadekoBot screen, type 
screen -X -S nadeko quit 
####Alternative Method to Install Nadeko
METHOD I
cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh
METHOD II
cd ~git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.gitcd ~/NadekoBot/discord.netdotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.jsondotnet restorecd ~/NadekoBot/src/NadekoBot/dotnet restoredotnet build --configuration Release