This commit is contained in:
Kwoth 2016-11-29 19:42:16 +01:00
commit 269463e5c9
3 changed files with 119 additions and 62 deletions

View File

@ -92,9 +92,19 @@ sudo apt-get update && sudo apt-get install ffmpeg -y
####Getting NadekoBot ####Getting NadekoBot
![img6](https://cdn.discordapp.com/attachments/251504306010849280/251505587089571850/getting_nadeko.gif) Use the following command to get and run `linuxAIO.sh`:
(Remember **DO NOT** rename the file `linuxAIO.sh`)
`cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh` `cd ~ && wget https://github.com/Kwoth/NadekoBot-BashScript/raw/master/linuxAIO.sh && bash linuxAIO.sh`
Follow the on screen instructions:
1. To Get the latest build. (most recent updates)
2. 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 ####Creating and Inviting bot
@ -141,8 +151,8 @@ sudo apt-get update && sudo apt-get install ffmpeg -y
- Copy the `credentials.json` to desktop - Copy the `credentials.json` to desktop
- EDIT it as it is guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#setting-up-credentialsjson-file) - EDIT it as it is guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#setting-up-credentialsjson-file)
- Paste/put it back in the folder once done. `(Using CyberDuck/WinSCP)` - Paste/put it back in the folder once done. `(Using CyberDuck/WinSCP)`
- If you already have Nadeko 1.0 setup and have `credentials.json` and `NadekoBot.db`, you can just copy and paste the `credentials.json` to `NadekoBot/src/NadekoBot` and `NadekoBot.db` to `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data` using CyberDuck. - **If** you already have Nadeko 1.0 setup and have `credentials.json` and `NadekoBot.db`, you can just copy and paste the `credentials.json` to `NadekoBot/src/NadekoBot` and `NadekoBot.db` to `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data` using CyberDuck.
- If you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/1.0/guides/Upgrading%20Guide/) - **If** you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/1.0/guides/Upgrading%20Guide/)
####Setting up Music ####Setting up Music
@ -152,32 +162,33 @@ Once done, go back to **PuTTY**
####Running NadekoBot ####Running NadekoBot
![img8](https://cdn.discordapp.com/attachments/251504306010849280/251506149973557259/running_nadeko.gif)
**Create a new Session:** **Create a new Session:**
- `tmux new -s nadeko` - `tmux new -s nadeko`
That command 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 the PuTTY. The above command 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 the PuTTY running.
- `cd NadekoBot/src/NadekoBot/` **Next, we need to run `linuxAIO.sh` in order to get the latest running scripts with patches:**
**Without Auto Restart:** - `cd ~ && bash linuxAIO.sh`
- `dotnet run --configuration Release` From the options,
**With Auto Restart:** Choose `3` To Run the bot normally.
**NOTE:** With option `3` (Running Normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#administration) in discord. The bot will shut down and will stay offline until you manually run it again. (best if you want to check the bot.)
- `while :; do dotnet run -c Release; sleep 5s; done` 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](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#administration) making the command `.die` to function as restart.
**NOTE:** With Auto Restart, bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#administration) so you do not have to manual restart if you ever want to. See how that happens:
See how that happens below:
![img9](https://cdn.discordapp.com/attachments/251504306010849280/251506312893038592/die_explaination.gif) ![img9](https://cdn.discordapp.com/attachments/251504306010849280/251506312893038592/die_explaination.gif)
**Remember** that, while running with Auto Restart, you will need to [close the tmux session](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#restarting-nadeko) to stop the bot completely.
**Now check your Discord, the bot should be online** **Now check your Discord, the bot should be online**
Now time to **move the bot to background** and to do that, press **CTRL+B+D** (this will detach the nadeko session using TMUX), and you can finally close PuTTY now. Next to **move the bot to background** and to do that, press **CTRL+B+D** (this will detach the nadeko session using TMUX), and you can finally close PuTTY now.
####Some more Info (just in case) ####Some more Info (just in case)
@ -205,25 +216,36 @@ Open **PuTTY** and login as you have before, type `reboot` and hit Enter.
- Kill your previous session, check with `tmux ls` - Kill your previous session, check with `tmux ls`
- `tmux kill-session -t nadeko` (don't forget to replace "nadeko" to what ever you named your bot's session) - `tmux kill-session -t nadeko` (don't forget to replace "nadeko" to what ever you named your bot's session)
- Follow: [Running NadekoBot](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#running-nadekobot) - [Run the bot again.](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#running-nadekobot)
####Updating Nadeko ####Updating Nadeko
- Connect to the terminal - Connect to the terminal through PuTTY.
- `tmux kill-session -t nadeko` (don't forget to replace **nadeko** in the command with the name of your bot's session)
- Make sure the bot is **not** running. - Make sure the bot is **not** running.
- `cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh` (The same command used to install earlier) - `tmux new -s nadeko` (**nadeko** is the name of the session)
- Run the bot again as normal. - `cd ~ && bash linuxAIO.sh`
- Choose either `1` or `2` to update the bot with **latest build** or **stable build** respectively.
- Choose either `3` or `4` to run the bot again with **normally** or **auto restart** respectively.
- Done. You can close PuTTY now.
####Alternative way to Install ####Alternative way to Install
- If the [Nadeko installer](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#getting-nadekobot) shows errors, try manually installing with the following steps: If the [Nadeko installer](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#getting-nadekobot) shows any kind error, check if you have the `linuxAIO.sh` file and make sure its not renamed or if you want to manually install the bot. Use the following command(s):
![img6](https://cdn.discordapp.com/attachments/251504306010849280/251505587089571850/getting_nadeko.gif)
`cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh`
**OR**
``` ```
cd ~ && git clone -b 1.0 --recursive --depth 1 https://github.com/Kwoth/NadekoBot.git cd ~ && git clone -b 1.0 --recursive --depth 1 https://github.com/Kwoth/NadekoBot.git
cd ~/NadekoBot/discord.net/src/Discord.Net && dotnet restore && cd ../Discord.Net.Commands && dotnet restore && cd ../../../src/NadekoBot/ && dotnet restore && dotnet build --configuration Release cd ~/NadekoBot/discord.net/src/Discord.Net && dotnet restore && cd ../Discord.Net.Commands && dotnet restore && cd ../../../src/NadekoBot/ && dotnet restore && dotnet build --configuration Release
``` ```
- If you are still getting errors using the above steps: If you are getting error using the above steps try:
``` ```
cd ~/NadekoBot/discord.net && dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json && dotnet restore cd ~/NadekoBot/discord.net && dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json && dotnet restore

View File

@ -1,4 +1,5 @@
### Setting Up NadekoBot on OSX ## Setting Up NadekoBot on OSX
#### Prerequisites #### Prerequisites
- [Homebrew][Homebrew] - [Homebrew][Homebrew]
- Google Account - Google Account
@ -54,10 +55,19 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
####Downloading and building Nadeko ####Downloading and building Nadeko
**METHOD I** Use the following command to get and run `linuxAIO.sh`:
(Remember **DO NOT** rename the file `linuxAIO.sh`)
- `cd ~` `cd ~ && wget https://github.com/Kwoth/NadekoBot-BashScript/raw/master/linuxAIO.sh && bash linuxAIO.sh`
- `curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh`
Follow the on screen instructions:
1. To Get the latest build. (most recent updates)
2. 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 DiscordBot application ####Creating DiscordBot application
- Go to [the Discord developer application page.][DiscordApp] - Go to [the Discord developer application page.][DiscordApp]
@ -101,15 +111,21 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
- Start Nadeko using .NET Core: - Start Nadeko using .NET Core:
`cd ~/NadekoBot/src/NadekoBot/` `cd ~ && bash linuxAIO.sh`
`dotnet run --configuration Release` From the options,
CHECK THE BOT IN DISCORD, IF EVERYTHING IS WORKING Choose `3` To Run the bot normally.
**NOTE:** With option `3` (Running Normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#administration) 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.)
Now time to move bot to background and to do that, press CTRL+B+D (this will detach the nadeko session using TMUX) 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](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#administration) making the command `.die` to be used as restart.
**NOTE:** [To stop the bot you will have to kill the session.](http://nadekobot.readthedocs.io/en/1.0/guides/OSX%20Guide/#some-more-info)
*If you used Screen press CTRL+A+D (this will detach the nadeko screen)* **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)
####Inviting your bot to your server ####Inviting your bot to your server
- [Invite Guide](http://discord.kongslien.net/guide.html) - [Invite Guide](http://discord.kongslien.net/guide.html)
@ -125,24 +141,14 @@ For Music Setup and API keys check [Setting up NadekoBot for Music](http://nadek
####Updating Nadeko ####Updating Nadeko
Nadeko is really easy to update as of version 1.0! just copy and paste the command below to update Nadeko to the latest version - 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)](http://nadekobot.readthedocs.io/en/1.0/guides/OSX%20Guide/#some-more-info)
`cd ~/NadekoBot/ && git init && git pull` - Make sure the bot is **not** running.
- `tmux new -s nadeko` (**nadeko** is the name of the session)
####Alternative Method to Install Nadeko - `cd ~ && bash linuxAIO.sh`
- Choose either `1` or `2` to update the bot with **latest build** or **stable build** respectively.
*If you fail to install the bot using [METHOD I](http://nadekobot.readthedocs.io/en/1.0/guides/OSX%20Guide/#downloading-and-building-nadeko) try:* - Choose either `3` or `4` to run the bot again with **normally** or **auto restart** respectively.
- Done. You can close terminal now.
**METHOD II**
- `cd ~`
- `git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
- `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`
####Some more Info ####Some more Info
@ -158,6 +164,23 @@ Nadeko is really easy to update as of version 1.0! just copy and paste the comma
- If you want to switch to/ see that screen, type `screen -r nadeko` (nadeko is the name of the screen we created before so, replace `nadeko` with the screen name you created.) - If you want to switch to/ see that screen, type `screen -r nadeko` (nadeko is the name of the screen we created before so, replace `nadeko` with the screen name you created.)
- If you want to kill the NadekoBot screen, type `screen -X -S nadeko quit` - 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.git`
- `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`
[Homebrew]: http://brew.sh/ [Homebrew]: http://brew.sh/
[DiscordApp]: https://discordapp.com/developers/applications/me [DiscordApp]: https://discordapp.com/developers/applications/me
[Atom]: https://atom.io/ [Atom]: https://atom.io/

View File

@ -2,7 +2,8 @@ ________________________________________________________________________________
*Thanks to @Flatbread and Mirai for making this guide* *Thanks to @Flatbread and Mirai for making this guide*
________________________________________________________________________________ ________________________________________________________________________________
### Setting Up NadekoBot on Windows ## Setting Up NadekoBot on Windows
#### Prerequisites #### Prerequisites
- 1) [.NET Core SDK][.NET Core SDK] - 1) [.NET Core SDK][.NET Core SDK]
- 2) [Git][Git] - 2) [Git][Git]
@ -11,18 +12,19 @@ ________________________________________________________________________________
- 5) Soundcloud Account (if you want soundcloud support) - 5) Soundcloud Account (if you want soundcloud support)
- 6) [7zip][7zip] (or whatever you are using, WinRar) - 6) [7zip][7zip] (or whatever you are using, WinRar)
- 7) [Notepad++][Notepad++] - 7) [Notepad++][Notepad++]
- 8) Windows 8 or newer - 8) Windows 8 or later
####Guide ####Guide
- Make sure you have installed both [Git][Git] and the [.NET Core SDK][.NET Core SDK]. - Make sure you have installed both [Git][Git] and the [.NET Core SDK][.NET Core SDK].
- Create a folder somewhere and name it `Nadeko`. - Create a **new folder** anywhere you like and name it `Nadeko`.
- Head to the [Windows Installer releases page][WinInstaller] and save the zip as prompted. - Next, [Right-Click on this link](https://github.com/Kwoth/NadekoBotInstallerWin/raw/master/NadekoWinAIO.bat) and select **Save link as** and save the file `NadekoWinAIO.bat` inside the `Nadeko` folder that we created earlier. (**DO NOT** rename the file `NadekoWinAIO.bat`)
- Extract the contents of the zip you just downloaded to the `Nadeko` folder that we created earlier. - Once that's done, double-click on `NadekoWinAIO.bat` to run it.
- You should see another folder in the `Nadeko` folder, something along the lines of `NadekoBotInstallerWin-master` copy the contents of this folder, to the `Nadeko` folder, then (optionally) remove the empty, `NadekoBotInstallerWin-master` folder - From the options,
- You should now see three files, most importantly, `NadekoInstaller.bat` after moving the contents of the folder mentioned above to the `Nadeko` folder (You may not see the `.bat` part of the filename). - Choose `1` to get the **most recent build**.
- Run/Launch/Open `NadekoInstaller.bat` and you will see it running in the command prompt. - Choose `2` to get the **stable build**.
- Wait a while for the file to finish installing, it'll display it's progress in the command prompt. - Wait a while for the file to finish installing, it'll display it's progress in the command prompt.
- You should now have a new folder named `NadekoBot` inside the `Nadeko` folder we previously created. - You should now have a new folder named `NadekoBot` inside the `Nadeko` folder we previously created.
- Once Installation is completed, press any key to close the command prompt.
####Creating DiscordBot application ####Creating DiscordBot application
- Go to [the Discord developer application page][DiscordApp]. - Go to [the Discord developer application page][DiscordApp].
@ -57,14 +59,24 @@ ________________________________________________________________________________
- The bot should have been added to your server. - The bot should have been added to your server.
####Starting the bot ####Starting the bot
- Go to the folder which you extracted the zip to earlier, and run the `NadekoRun.bat` file - Go to the `Nadeko` folder that we have created earlier, and run the `NadekoWinAIO.bat` file.
- Your bot should now be online in the server we added her to. - From the options,
- Note: Your bot will be offline in case you close the `NadekoBot` command prompt window. - Choose `3` to **run the bot normally**.
(with normal-run the bot will shutdown and will stay offline if it disconnects by the use of `.die` command until you manually run it again. Useful if you want to test the bot.)
- Choose `4` to **run the bot with auto restart**.
(with auto restart the bot will restart itself if it disconnects by the use of `.die` command. Useful if you want to have restart function for any reason.)
####Updating NadekoBot ####Updating NadekoBot
- Make sure the bot is closed and is not running (Run `.die` in a connected server to ensure it's not running). - Make sure the bot is closed and is not running (Run `.die` in a connected server to ensure it's not running).
- Run `NadekoInstaller.bat` again and wait for it to finish. - Once that's checked, go to the `Nadeko` folder.
- Run `NadekoRun.bat`. - Run the `NadekoWinAIO.bat` file.
- From the options,
- Choose `1` to get the **most recent build**.
- Choose `2` to get the **stable build**.
- Follow the messages and press any key to continue.
- Wait for it to finish.
- Press any key to close the window when it shows **Installation complete.**
- [Start the bot again.](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#starting-the-bot)
- You've updated and are running again, easy as that! - You've updated and are running again, easy as that!
________________________________________________________________________________ ________________________________________________________________________________
@ -99,7 +111,7 @@ ________________________________________________________________________________
- Setup your API keys as explained above. - Setup your API keys as explained above.
- Restart your computer. - Restart your computer.
[.NET Core SDK]: https://go.microsoft.com/fwlink/?LinkID=827524 [.NET Core SDK]: https://www.microsoft.com/net/core#windowscmd
[Git]: https://git-scm.com/download/win [Git]: https://git-scm.com/download/win
[WinInstaller]: https://github.com/Kwoth/NadekoBotInstallerWin/archive/master.zip [WinInstaller]: https://github.com/Kwoth/NadekoBotInstallerWin/archive/master.zip
[FFMPEG]: https://github.com/Soundofdarkness/FFMPEG-Inst/releases [FFMPEG]: https://github.com/Soundofdarkness/FFMPEG-Inst/releases