This commit is contained in:
Kwoth 2016-10-24 07:57:36 +02:00
commit 273f5a29a2
2 changed files with 44 additions and 15 deletions

View File

@ -97,12 +97,26 @@ sudo apt-get update && sudo apt-get install ffmpeg -y`
####Getting NadekoBot ####Getting NadekoBot
**10)** **10)**
`cd ~ && git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git` - `cd ~`
- `curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh`
*Skip steps 10.5-11.5 and continue to run the bot, if you see errors while running, do the below steps again.*
**10.5)**
- `cd ~ && git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
####Building NadekoBot ####Building NadekoBot
**11)** **11)**
`cd ~/NadekoBot/ && dotnet restore && cd ~/NadekoBot/src/NadekoBot/ && dotnet build --configuration Release` - `cd ~/NadekoBot/ && dotnet restore && cd ~/NadekoBot/src/NadekoBot/ && dotnet build --configuration Release`
*if you see error, try:*
**11.5)**
- `cd ~/NadekoBot/discord.net`
- `dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json`
- `dotnet restore`
- `cd ~/NadekoBot/src/NadekoBot/`
- `dotnet restore`
- `dotnet build --configuration Release`
####Setting up NadekoBot ####Setting up NadekoBot
@ -130,8 +144,6 @@ sudo apt-get update && sudo apt-get install ffmpeg -y`
Go back to **PuTTY**, `(hope its still running xD)` Go back to **PuTTY**, `(hope its still running xD)`
**12)** **12)**
Type/ Copy and hit **Enter**.
`tmux new -s nadeko` `tmux new -s nadeko`
`cd NadekoBot/src/NadekoBot/` `cd NadekoBot/src/NadekoBot/`
**^this will create a new session named “nadeko”** *(you can replace “nadeko” with anything you prefer and remember its your session name)* so you can run the bot in background without having to keep running PuTTY in the background. **^this will create a new session named “nadeko”** *(you can replace “nadeko” with anything you prefer and remember its your session name)* so you can run the bot in background without having to keep running PuTTY in the background.

View File

@ -7,7 +7,7 @@
####Installing Homebrew ####Installing Homebrew
`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` ```/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"```
Run `brew update` to fetch the latest package data. Run `brew update` to fetch the latest package data.
@ -26,14 +26,16 @@ brew install tmux
``` ```
####Installing .NET Core SDK ####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/libcrypto.1.0.0.dylib /usr/local/lib/`
- `ln -s /usr/local/opt/openssl/lib/libssl.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, found [here.](https://go.microsoft.com/fwlink/?LinkID=827526) - Download the .NET Core SDK, found [here.](https://go.microsoft.com/fwlink/?LinkID=827526)
- Open the `.pkg` file you downloaded and install it. - Open the `.pkg` file you downloaded and install it.
- `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin`
####Check your `FFMPEG` ####Check your `FFMPEG`
**In case your `FFMPEG` wasnt installed properly** **In case your `FFMPEG` wasnt installed properly (Optional)**
- `brew options ffmpeg` - `brew options ffmpeg`
- `brew install ffmpeg --with-x --with-y --with-z` etc. - `brew install ffmpeg --with-x --with-y --with-z` etc.
@ -43,6 +45,7 @@ brew install tmux
- Then try `brew install ffmpeg` again. - Then try `brew install ffmpeg` again.
####Installing xcode-select ####Installing xcode-select
Xcode command line tools. You will do this in Terminal.app by running the following command line: Xcode command line tools. You will do this in Terminal.app by running the following command line:
`xcode-select --install` `xcode-select --install`
@ -50,11 +53,21 @@ Xcode command line tools. You will do this in Terminal.app by running the follow
A dialog box will open asking if you want to install `xcode-select`. Select install and finish the installation. A dialog box will open asking if you want to install `xcode-select`. Select install and finish the installation.
####Downloading and building Nadeko ####Downloading and building Nadeko
**METHOD I**
- `cd ~`
- `curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh`
*If you fail to run the bot with* `METHOD I` *try:*
**METHOD II**
- `cd ~` - `cd ~`
- `git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git` - `git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
- `cd ~/NadekoBot/` - `cd ~/NadekoBot/discord.net`
- `dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json`
- `dotnet restore` - `dotnet restore`
- `cd ~/NadekoBot/src/NadekoBot/` - `cd ~/NadekoBot/src/NadekoBot/`
- `dotnet restore`
- `dotnet build --configuration Release` - `dotnet build --configuration Release`
####Creating DiscordBot application ####Creating DiscordBot application
@ -67,7 +80,7 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
- Keep this window open for now. - Keep this window open for now.
####Setting up Credentials.json file ####Setting up Credentials.json file
- Open up the `NadekoBot` folder, which should be in your home directory, then the `src` folder and then the additonal `NadekoBot` folder. - Open up the `NadekoBot` folder, which should be in your home directory, then `NadekoBot` folder then `src` folder and then the additonal `NadekoBot` folder.
- In our `NadekoBot` folder you should have `.json` file named `credentials.json`. (Note: If you do not see a **.json** after `credentials.json `, do not add the `**.json**`. You most likely have `"Hide file extensions"` enabled.) - In our `NadekoBot` folder you should have `.json` file named `credentials.json`. (Note: If you do not see a **.json** after `credentials.json `, do not add the `**.json**`. You most likely have `"Hide file extensions"` enabled.)
- If you mess up the setup of `credentials.json`, rename `credentials_example.json` to `credentials.json`. - If you mess up the setup of `credentials.json`, rename `credentials_example.json` to `credentials.json`.
- Open the file with your Text editor. - Open the file with your Text editor.
@ -83,27 +96,31 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
####Running NadekoBot ####Running NadekoBot
- Using tmux
`tmux new -s nadeko` `tmux new -s nadeko`
^this will create a new session named “nadeko” ^this will create a new session named “nadeko”
`(you can replace “nadeko” with anything you prefer and remember its your session name)`. `(you can replace “nadeko” with anything you prefer and remember its your session name)`.
or if you want to use Screen, run: - Using Screen
If you want to use Screen, run:
`screen -S nadeko` `screen -S nadeko`
^this will create a new screen named “nadeko” ^this will create a new screen named “nadeko”
`(you can replace “nadeko” with anything you prefer and remember its your screen name)`. `(you can replace “nadeko” with anything you prefer and remember its your screen name)`.
`cd ~/NadekoBot/src/NadekoBot/`
- Start Nadeko using dotnet: - Start Nadeko using dotnet:
`cd ~/NadekoBot/src/NadekoBot/`
`dotnet run --configuration Release` `dotnet run --configuration Release`
CHECK THE BOT IN DISCORD, IF EVERYTHING IS WORKING CHECK THE BOT IN DISCORD, IF EVERYTHING IS WORKING
Now time to move bot to background and to do that, press CTRL+B+D (this will ditach the nadeko session using TMUX) 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)* *If you used Screen press CTRL+A+D (this will detach the nadeko screen)*
@ -112,7 +129,7 @@ Now time to move bot to background and to do that, press CTRL+B+D (this will dit
- Copy your `Client ID` from your [Discord bot applications page.][DiscordApp] - Copy your `Client ID` from your [Discord bot applications page.][DiscordApp]
- Replace the `12345678` in this link `https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303` with your `Client ID`. - Replace the `12345678` in this link `https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303` with your `Client ID`.
- Your edited link should look like this: `https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID**&scope=bot&permissions=66186303`. - Your edited link should look like this: `https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID**&scope=bot&permissions=66186303`.
- Go to newly created link and pick the server we created, and click `Authorize`. - Go to newly created link and pick the server, and click `Authorize`.
- Bot should be added to your server. - Bot should be added to your server.
####Setting NadekoBot Music ####Setting NadekoBot Music