Windows Guide updated for 1.0

`ZipContainingAllTheInstallerFiles` is of course, a placeholder untill I can get an actual filename for this
This commit is contained in:
Jordan Fearnley 2016-10-12 09:12:28 +01:00 committed by GitHub
parent 5e80a0f6ef
commit deda1b1abf

View File

@ -5,72 +5,68 @@ ________________________________________________________________________________
### Setting Up NadekoBot on Windows ### Setting Up NadekoBot on Windows
#### Prerequisites #### Prerequisites
- 1) [NET Framework][NET Framework] 4.5.2 (or 4.6) - 1) [NET Framework][NET Framework] 4.5.2 (or 4.6)
- 2) [FFMPEG][FFMPEG] - 2) [.NET core SDK][.NET SDK]
- 3) Google Account - 3) [Git][Git]
- 4) Soundcloud Account (if you want soundcloud support) - 4) [FFMPEG][FFMPEG]
- 5) [7zip][7zip] (or whatever you are using, WinRar) - 5) Google Account
- 6) [Notepad++][Notepad++] - 6) Soundcloud Account (if you want soundcloud support)
- 7) [7zip][7zip] (or whatever you are using, WinRar)
- 8) [Notepad++][Notepad++]
####Guide ####Guide
- Make sure you have installed both [Git][Git] and the [.NET core sdk][.NET SDK]
- Create a folder, name it `Nadeko`. - Create a folder somewhere and name it `Nadeko`.
- Head to [Updater Releases Page][Updater] and download `WINDOWS.-.nadeupdater.7z`. - Head to the [NadekoBot Releases Page][Releases] and download `ZipContainingAllTheInstallerFiles`.
- Copy `WINDOWS.-.nadeupdater.7z` to the `Nadeko` (folder we created before) and extract everything. - Copy `ZipContainingAllTheInstallerFiles` to the `Nadeko` folder that we created earlier, and extract everything.
- You will see a file `NadekoUpdater.bat ` and a folder `publish ` after extraction. - 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 the file `NadekoUpdater.bat ` and you will see it running in cmd.exe asking you with **3 options** *1-3*. - Run/Launch/Open `NadekoInstaller.bat ` and you will see it running in the command prompt.
- 1) Stable release - current stable release, but might not contain all the newest Nadeko updates. - Wait a while for the file to finish installing, it'll say when it's done in the command prompt.
- 2) Newest release - release with all features/upgrades. - You should now have a new folder named `NadekoBot` inside the `Nadeko` folder we previously created.
- 3) Exit - Run the `NadekoRun.bat` file and wait for windows to tell you dotnet has crashed, then choose to close
- Press `2` on your keyboard and hit `Enter`. Type `y` and hit `Enter` again. Downloading might take a while, so just be patient and wait. When download is done, press `3` on your keyboard and close the updater. - If it still exists, you can safely delete the `NadekoInstall_Temp` folder.
- You should have a new folder named `NadekoBot` inside the `Nadeko` folder we previously created.
####Creating DiscordBot application ####Creating DiscordBot application
- Go to [DiscordApp][DiscordApp]. - Go to [the Discord developer application page][DiscordApp].
- Log in with your Discord account. - Log in with your Discord account.
- On the left side, press `New Application`. - On the left side, press `New Application`.
- Fill out the `App Name` (your bot's name, in this case), put the image you want, and add an app description(optional). - Fill out the `App Name` (your bot's name, in this case), put the image you want, and add an app description(optional).
- Create the application. - Create the application.
- Once the application is created, click on `Create a Bot User` and confirm it. - 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. - Keep this window open for now.
####Setting up Credentials.json file ####Setting up Credentials.json file
- 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.) - In our `NadekoBot` folder you should have another `NadekoBot` folder, then 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`. - Rename `credentials_example.json` to `credentials.json`.
- Open the file with your [Notepad++][Notepad++]. - Open the file with [Notepad++][Notepad++].
- In there you will see fields like `Token`, `ClientId`, `BotId`, `OwnerIDs`. - In there you will see fields such as `Token`, `ClientId`, `BotId` and `OwnerIDs`.
- In your [DiscordApp][DiscordApp], under `Bot User` part, you will see the `Token:click to reveal` part, click to reveal it. - 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 put it between `" "` in your `credentials.json` file. - 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 `Client ID` and replace it with the example one in your `credentials.json` in `Client ID` **and** `BotID` field. - 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.
- Save your `credentials.json` but keep it open. We need to put your `User ID` and owner. - 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.
####Inviting your bot to your server ####Inviting your bot to your server
- [Invite Guide][Invite Guide] - [Invite Guide][Invite Guide]
- Create a new server in Discord. - Create a new server in Discord.
- Copy your `Client ID` from your [DiscordApp][DiscordApp]. - Copy your `Client ID` from your [applications page][DiscordApp].
- Replace `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`.
- Link should look like this: `https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID**&scope=bot&permissions=66186303`. - The link should now 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 the newly created link and pick the server we created, and click `Authorize`.
- Bot should be added to your server. - The bot should have been added to your new server.
####Starting the bot ####Starting the bot
- Enter your `NadekoBot` folder that should be (hopefully) in your `Nadeko` folder. - Go to the folder which you extracted the zip to earlier, and run the `NadekoRun.bat` file
- Run `NadekoBot.exe` (Note: There is `NadekoBot.exe` and `NadekoBot.exe.config`, dont run the second one)
- Your bot should now be online in the server we added him to. - Your bot should now be online in the server we added him to.
- Note: Your bot will be offline in case you close `NadekoBot.exe`. - Note: Your bot will be offline in case you close the `NadekoBot` command prompt window.
####Setting up OwnerIds ####Setting up OwnerIds
- In the server where your bot is, in a text channel, type `.uid` - In the server where your bot is, in a text channel, type `.uid`
- Your `User ID` should show, copy it. - Your `User ID` should show, copy it.
- Close `NadekoBot.exe` - Close `NadekoBot.exe`
- Replace your `User ID` in the `credentials.json` between `[ ]` and save the changes. - 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 `NadekoBot.exe` again. - Run `NadekoRun.bat` again.
- Now you are the bot owner. - If done correctly, you are now the bot owner.
- You can add `User IDs` from the other users by separating IDs with a comma if you want to have more owners. - You can add multiple owner IDs by seperating them with a comma within the square brackets.
`*Alternatively, you can download nadekobot from` [Releases][Releases] `and extract the zip yourself.
That is what updater does, except it makes it easier for you to update because it doesn't overwrite
important files.If you are downloading releases you will have to be careful about your config,
credentials, and other files you edited in order to preserve your data every time you update.`
________________________________________________________________________________ ________________________________________________________________________________
@ -86,13 +82,13 @@ ________________________________________________________________________________
- On the left tab, access `Credentials`. Click `Create Credentials` button. Click on `API Key`. A new window will appear with your `Google API key`. - On the left tab, access `Credentials`. Click `Create Credentials` button. Click on `API Key`. A new window will appear with your `Google API key`.
- Copy the key. - Copy the key.
- Open up `credentials.json`. - Open up `credentials.json`.
- For `"GoogleAPIKey"`, fill in with the new key we copied. - For `"GoogleAPIKey"`, replace `null` with the new key we copied and put quotation marks before and after the API key, like how the `Token` and `ClientId` should be set up.
- Follow these steps on how to setup Soundcloud API key: - Follow these steps on how to setup Soundcloud API key:
- Go to [Soundcloud][Soundcloud]. - Go to [Soundcloud][Soundcloud].
- Enter a name for the app and create it. - Enter a name for the app and create it.
- You will see a page with the title of your app, and a field labeled `Client ID`. Copy the ID. - You will need to fill out an application form to request access to the Soundcloud API.
- In `credentials.json`, fill in `"SoundcloudClientID"` with the copied ID. - All requests for an API key must go through the review process, where applications will be reviewed on a case by case basis, in line with Soundcloud API Terms of Use. If your application is successful, you will receive an API key.
- Restart your computer. - **Restart your computer**.
####Manual `ffmpeg` setup ####Manual `ffmpeg` setup
**Do this step in case you were not able to install `ffmpeg` with the installer.** **Do this step in case you were not able to install `ffmpeg` with the installer.**
@ -106,9 +102,10 @@ ________________________________________________________________________________
- Restart your computer. - Restart your computer.
[NET Framework]: https://www.microsoft.com/en-us/download/details.aspx?id=48130 [NET Framework]: https://www.microsoft.com/en-us/download/details.aspx?id=48130
[.NET SDK]: https://www.microsoft.com/net/core#windows
[Git]: https://git-scm.com/download/win
[FFMPEG]: https://github.com/Soundofdarkness/FFMPEG-Installer [FFMPEG]: https://github.com/Soundofdarkness/FFMPEG-Installer
[7zip]: http://www.7-zip.org/download.html [7zip]: http://www.7-zip.org/download.html
[Updater]: https://github.com/Kwoth/NadekoUpdater/releases
[Releases]: https://github.com/Kwoth/NadekoBot/releases [Releases]: https://github.com/Kwoth/NadekoBot/releases
[DiscordApp]: https://discordapp.com/developers/applications/me [DiscordApp]: https://discordapp.com/developers/applications/me
[Notepad++]: https://notepad-plus-plus.org/ [Notepad++]: https://notepad-plus-plus.org/