This commit is contained in:
Kwoth 2016-10-22 13:11:14 +02:00
commit e9b1ea754b
5 changed files with 53 additions and 68 deletions

View File

@ -97,17 +97,12 @@ sudo apt-get update && sudo apt-get install ffmpeg -y`
####Getting NadekoBot
**10)**
`git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
`cd ~ && git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
####Building NadekoBot
**11)** `cd /NadekoBot/discord.net/src/Discord.Net`
`dotnet restore && dotnet build --configuration Release`
**12)**
`cd ../Discord.Net.Commands/ && dotnet restore && dotnet build --configuration Release`
**13)**
`cd ../../../src/NadekoBot/ && dotnet restore && dotnet build --configuration Release`
**11)**
`cd ~/NadekoBot/ && dotnet restore && cd ~/NadekoBot/src/NadekoBot/ && dotnet build --configuration Release`
####Setting up NadekoBot
@ -120,29 +115,28 @@ sudo apt-get update && sudo apt-get install ffmpeg -y`
- In **Password:** type `the new root password (you changed at the start)`
- Click on **Connect**
- It should show you the NadekoBot folder which was created by git earlier
- Open that folder, then open the `src` folder, followed by another `NadekoBot` folder and you should see `credentials_example.json` here
- Open that folder, then open the `src` folder, followed by another `NadekoBot` folder and you should see `credentials.json` here
####Renaming Credentials.json
####Setting up credentials.json
- Copy the `credentials_example.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)
- Read here how to [create a DiscordBot application](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#creating-discordbot-application)
- Rename it to `credentials.json` and paste/put it back in the folder. `(Yes, using CyberDuck)`
- You should see two files `credentials_example.json` and `credentials.json`
- Also if you already have nadeko 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.
- 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)
- Read here how to [create a DiscordBot application.](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#creating-discordbot-application)
- Paste/put it back in the folder once done. `(Yes, using CyberDuck)`
- If you already have nadeko 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.
####Running NadekoBot
Go back to **PuTTY**, `(hope its still running xD)`
**14)**
**12)**
Type/ Copy and hit **Enter**.
`tmux new -s nadeko`
`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.
**15)**
**13)**
`dotnet run --configuration Release`
**CHECK THE BOT IN DISCORD, IF EVERYTHING IS WORKING**
@ -171,7 +165,7 @@ Open **PuTTY** and login as you have before, type `reboot` and hit Enter.
- Make sure the bot is **not** running
- Connect to the terminal
- `cd NadekoBot`
- `cd ~\NadekoBot\`
- `git init && git pull`
- Run the bot again as normal, and you've updated!

View File

@ -10,6 +10,7 @@
`/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
@ -28,7 +29,7 @@ brew install tmux
- `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, found [here.](https://go.microsoft.com/fwlink/?LinkID=827526)
- Open the `.pkg` and install it.
- Open the `.pkg` file you downloaded and install it.
####Check your `FFMPEG`
@ -51,14 +52,10 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
####Downloading and building Nadeko
- `cd ~`
- `git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
- `cd /NadekoBot/discord.net/src/Discord.Net`
- `dotnet restore && dotnet build --configuration Release`
- `cd ../Discord.Net.Commands/`
- `dotnet restore && dotnet build --configuration Release`
- `cd ../../../src/NadekoBot/`
- `dotnet restore && dotnet build --configuration Release`
- `dotnet run --configuration Release`
- The above step **will** crash, giving you an error, which will say that `credentials_example.json` has been generated, we'll use this soon
- `cd ~/NadekoBot/`
- `dotnet restore`
- `cd ~/NadekoBot/src/NadekoBot/`
- `dotnet build --configuration Release`
####Creating DiscordBot application
- Go to [the Discord developer application page.][DiscordApp]
@ -71,14 +68,18 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
####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.
- In our `NadekoBot` folder you should have `.json` file named `credentials_example.json`. (Note: If you do not see a **.json** after `credentials_example.json `, do not add the `**.json**`. You most likely have `"Hide file extensions"` enabled.)
- Rename `credentials_example.json` to `credentials.json`.
- 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`.
- Open the file with your Text editor.
- In your [applications page][DiscordApp] (the window you were asked to keep open earlier), under the `Bot User` section, you will see `Token:click to reveal`, click to reveal the token.
- Copy your bot's token, and on the `"Token"` line of your `credentials.json`, replace `null` with your bot token and put quotation marks before and after the token, like so `"Example.Token"`
- Copy the `Client ID` on the page and replace the null part of the `ClientId` line with it, and put quotation marks before and after, like earlier.
- Again, copy the same `Client ID` and replace the null part of the `BotId` line with it, and do **not** put quotation marks before and after the ID.
- Save your `credentials.json` but keep it open. We need to add your `User ID` as one of the `OwnerIds` shortly.
- Go to a server on discord and attempt to mention yourself, but put a backslash at the start as shown below
- So the message `\@fearnlj01#3535` will appears as `<@145521851676884992>` after you send the message (to make it slightly easier, add the backslash after you type the mention out)
- The message will appear as a mention if done correctly, copy the numbers from the message you sent (`145521851676884992`) and replace the `0` on the `OwnerIds` section with your user ID shown earlier.
- Save `credentials.json` (make sure you aren't saving it as `credentials.json.txt`)
- If done correctly, you are now the bot owner. You can add multiple owners by seperating each owner ID with a comma within the square brackets.
####Running NadekoBot
@ -114,15 +115,6 @@ Now time to move bot to background and to do that, press CTRL+B+D (this will dit
- Go to newly created link and pick the server we created, and click `Authorize`.
- Bot should be added to your server.
####Setting up OwnerIds
- In the server where your bot is, in a text channel, type `.uid`
- Your `User ID` should show, copy it.
- Stop NadekoBot from running by presing `Ctrl + C` in the terminal that the bot is running in
- Replace the `null` section on the `OwnerIds` line with your user ID shown earlier and put a square bracket around each end of the ID like so, `[105635576866156544]`
- Run Nadeko again, as guided above.
- If done correctly, you are now the bot owner.
- You can add multiple owner IDs by seperating them with a comma within the square brackets.
####Setting NadekoBot Music
For Music Setup and API keys check [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#setting-up-nadekobot-for-music) and [JSON Explanations](http://nadekobot.readthedocs.io/en/1.0/JSON%20Explanations/).

View File

@ -1,10 +1,9 @@
###Upgrading Nadeko from an older release
- Navigate to your old nadeko folder
- Follow the correct install process for your operating system, linked on the left hand side. Nadeko has some new dependencies, so make sure you get these as guided!
- For upgrading, you can use your old credentials file without any issues and most data can also be migrated
- Copy both the data folder and `credentials.json` from your old Nadeko installation, to the following folder
- `NadekoBot\src\NadekoBot` - This may ask if you want to overwrite some files, this is perfectly fine to do.
- Now launch the new Nadeko as the guide describes - it should now start.
- In any channel, run the `.migratedata` command - nadeko will now attempt to migrate your old data to nadeko's new storage system
- Your data should now have been migrated succesfully, restart nadeko and everything should be working as expected
- Follow the Windows Guide/Linux Guide/OS X Guide linked on the left.
- Navigate to your old `Nadeko` folder and copy `credentials.json` and the `/data/` folder.
- Paste this into the new Nadeko's `/NadekoBot/src/NadekoBot/` folder.
- If it asks you to overwrite files, it is fine to do so.
- Now launch new Nadeko as the guide describes.
- In any channel, run the `.migratedata` command - nadeko will now migrate your old data.
- Restart nadeko and everything should work as expected!

View File

@ -16,10 +16,10 @@ ________________________________________________________________________________
####Guide
- Make sure you have installed both [Git][Git] and the [.NET Core SDK][.NET Core SDK].
- Create a folder somewhere and name it `Nadeko`.
- Head to the [Windows Installer releases page][WinInstaller] and download the latest source code zip.
- Head to the [Windows Installer releases page][WinInstaller] and download the latest release zip.
- Extract the contents of the zip you just downloaded to the `Nadeko` folder that we created earlier.
- You will see a few files, most importantly, `NadekoInstaller.bat ` after extraction (You may not see the `.bat` part of the filename).
- Run/Launch/Open `NadekoInstaller.bat ` and you will see it running in the command prompt.
- You will see two files, most importantly, `NadekoInstaller.bat` after extraction (You may not see the `.bat` part of the filename).
- Run/Launch/Open `NadekoInstaller.bat` and you will see it running in the command prompt.
- Wait a while for the file to finish installing, it'll say when it's done in the command prompt.
- You should now have a new folder named `NadekoBot` inside the `Nadeko` folder we previously created.
- You can safely delete the `NadekoInstall_Temp` folder if you so choose.
@ -33,16 +33,20 @@ ________________________________________________________________________________
- Click on `Create a Bot User` and confirm that you do want to add a bot to this app.
- Keep this window open for now.
####Setting up Credentials.json file
- In our `NadekoBot` folder you should see a `src` folder, then *another* `NadekoBot` folder, in this final folder, you should see a `.json` file named `credentials_example.json`. (Note: If you do not see a **.json** after `credentials_example.json `, do not add the `**.json**`. You most likely have `"Hide file extensions"` enabled.)
- Rename `credentials_example.json` to `credentials.json`.
####Setting up credentials.json file
- In our `NadekoBot` folder you should see a `src` folder, then *another* `NadekoBot` folder, in this final folder, you should see a `.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`.
- Open the file with [Notepad++][Notepad++].
- In there you will see fields such as `Token`, `ClientId`, `BotId` and `OwnerIDs`.
- In your [applications page][DiscordApp] (the window you were asked to keep open earlier), under the `Bot User` section, you will see `Token:click to reveal`, click to reveal the token.
- Copy your bot's token, and on the `"Token"` line of your `credentials.json`, paste your bot token between the quotation marks.
- Copy the `Client ID` on the page and replace the `12312123` part of the `ClientId` line with it.
- Again, copy the same `Client ID` and replace the `null` part of the `BotId` line with it.
- Save your `credentials.json` but keep it open. We need to add your `User ID` as one of the `OwnerIds` shortly.
- Go to a server on discord and attempt to mention yourself, but put a backslash at the start like shown below
- So the message `\@fearnlj01#3535` will appears as `<@145521851676884992>` after you send the message (to make it slightly easier, add the backslash after you type the mention out)
- The message will appear as a mention if done correctly, copy the numbers from the message you sent (`145521851676884992`) and replace the `0` on the `OwnerIds` section with your user ID shown earlier.
- Save `credentials.json` (make sure you aren't saving it as `credentials.json.txt`)
- If done correctly, you are now the bot owner. You can add multiple owners by seperating each owner ID with a comma within the square brackets.
####Inviting your bot to your server
- [Invite Guide][Invite Guide]
@ -58,15 +62,11 @@ ________________________________________________________________________________
- Your bot should now be online in the server we added her to.
- Note: Your bot will be offline in case you close the `NadekoBot` command prompt window.
####Setting up OwnerIds
- In the server where your bot is, in a text channel, type `.uid`
- Your `User ID` should show, copy it.
- Close `NadekoBot`
- Replace the `0` on the `OwnerIds` section with your user ID shown earlier.
- Run `NadekoRun.bat` again.
- If done correctly, you are now the bot owner.
- You can add multiple owner IDs by seperating them with a comma within the square brackets.
####Updating NadekoBot
- 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.
- Run `NadekoRun.bat`.
- You've updated, easy as that!
________________________________________________________________________________
#### Setting Up NadekoBot For Music