Merge pull request #1260 from samdivaio/1.4

1 4 documentation update
This commit is contained in:
Master Kwoth 2017-06-15 01:47:42 +02:00 committed by GitHub
commit e7422c6db0
4 changed files with 222 additions and 182 deletions

View File

@ -1,68 +1,161 @@
###Setting up your Credentials ## Setting up your Credentials
If you do not see `credentials.json` you will need to rename `credentials_example.json` to `credentials.json`. If you do not see `credentials.json` you will need to rename `credentials_example.json` to `credentials.json`.
**This is how the unedited credentials look:** **This is how the `credentials.json` looks with all the APIs:**
```json ```json
{ {
"ClientId": 123123123, "ClientId": 179372110000358912,
"BotId": null, "BotId": 179372110000358912,
"Token": "", "Token": "MTc5MzcyXXX2MDI1ODY3MjY0.ChKs4g.I8J_R9XX0t-QY-0PzXXXiN0-7vo",
"OwnerIds": [ "OwnerIds": [
0 105635123466156544,
105635123566156544,
105635123666156544
], ],
"LoLApiKey": "", "LoLApiKey": "6e99ecf36f0000095b0a3ccfe35df45f",
"GoogleApiKey": "", "GoogleApiKey": "AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM",
"MashapeKey": "", "MashapeKey": "4UrKpcWXc2mshS8RKi00000y8Kf5p1Q8kI6jsn32bmd8oVWiY7",
"OsuApiKey": "", "OsuApiKey": "4c8c8fdff8e1234581725db27fd140a7d93320d6",
"SoundCloudClientId": "",
"CarbonKey": "",
"Db": null, "Db": null,
"TotalShards": 1 "TotalShards": 1
} }
``` ```
####Required Parts -----
- **Token** - Required to log in. Refer to this [guide](http://discord.kongslien.net/guide.html) #### Creating Discord Bot application
- **OwnerIds** - Required for the **Owner-Only** commands. Seperate multiple Id's with a comma. ![img2](http://i.imgur.com/x3jWudH.gif)
- **BotId** - Required for custom reactions to work.
- **Important : Bot ID and Client ID will be the same in newer bot accounts due to recent changes by Discord.**
_BotId and the OwnerIds are **NOT** the names of the owner and the bot. If you do not know the id of your bot, keep the two random numbers in those fields and - Go to [the Discord developer application page][DiscordApp].
run the bot then do `.uid @MyBotName` - this will give you your bot_id. - Log in with your Discord account.
Do the same for yourself with `.uid @MyName` Put these numbers in their respective field of the credentials._ - On the left side, press `New Application`.
- Fill out the `App Name` (Your bot's name, in this case)
- Put the image if you want, and add an app description. **(Optional)**
- Create the application.
- 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 your API keys
==================== #### Inviting your bot to your server
####This part is completely optional, **However it is necessary for music to work properly** ![img4](http://i.imgur.com/aFK7InR.gif)
- **GoogleAPIKey** - Required for Youtube Song Search, Playlist queuing, and URL Shortener. `~i` and `~img`.
You can get this api Key [here](https://console.developers.google.com/apis) - [Invite Guide][Invite Guide]
- **SoundCloudClientID** - Required to queue soundloud songs from sc links. - Copy your `Client ID` from your [applications page][DiscordApp].
You will need to create a new app [here](http://soundcloud.com/you/apps). **Please note you must be logged into SoundCloud** - Replace the **`12345678`** in this link:
- Simply click Register a new application and enter a name. `https://discordapp.com/oauth2/authorize?client_id=`**`12345678`**`&scope=bot&permissions=66186303` with your `Client ID`.
- Copy the Client ID and click "save app" then paste the Client Id it into your `credentials.json` - The link should now look like this:
- **MashapeKey** - Required for Urban Disctionary, Hashtag search, and Hearthstone cards. `https://discordapp.com/oauth2/authorize?client_id=`**`YOUR_CLENT_ID_HERE`**`&scope=bot&permissions=66186303`
You need to create an account on their [api marketplace](https://market.mashape.com/), after that go to `market.mashape.com/YOURNAMEHERE/applications/default-application` and press **Get the keys** in the top right corner. - 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
![img3](http://i.imgur.com/QwKMnTG.gif)
- In your [Discord applications page][DiscordApp], under the `Bot User` section, you will see `Token:click to reveal`, click to reveal the token.
*Note: Make sure that you actually use a Token and not a Client Secret!* It is in the **App Bot User** section.
- Copy your bot's token, and on the **`"Token"`** line of your `credentials.json`, paste your bot token **between** the quotation marks.
```
It should look like:
```
```json
"Token": "MTc5MzcyXXX2MDI1ODY3MjY0.ChKs4g.I8J_R9XX0t-QY-0PzXXXiN0-7vo",
```
- Copy the `Client ID` on the page and replace the `12312123` part of the **`"ClientId"`** line with it.
- **Important: Bot ID and Client ID** will be the same in **newer bot accounts** due to recent changes by Discord.
- If that's the case, **copy the same client ID** to **`"BotId"`**
```
It should look like:
```
```json
"ClientId": 179372110000358912,
"BotId": 179372110000358912,
```
- Go to your Discord server and attempt to mention yourself, but put a backslash at the start like shown below:
*(to make it slightly easier, add the backslash after you type the mention out)*
- So the message `\@fearnlj01#3535` will appear as `<@145521851676884992>` after you send the message.
- The message will appear as a mention if done correctly, copy the numbers from the message **`145521851676884992`** and replace the ID (By default, the ID is `105635576866156544`) on the `OwnerIds` section with your user ID shown earlier.
- Save `credentials.json`
- 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.
```
For single owner it should look like:
```
```json
"OwnerIds": [
105635576866156544
],
```
```
For multiple owners it should look like:
```
```json
"OwnerIds": [
105635123466156544,
105635123566156544,
105635123666156544
],
```
-----
## Setting up your API keys
This part is completely optional, **However it is necessary for music and few other features to work properly**
- **GoogleAPIKey**
- Required for Youtube Song Search, Playlist queuing, URL Shortener and lot more.
- Follow these steps on how to setup Google API keys:
- Go to [Google Console][Google Console] and log in.
- Create a new project (name does not matter).
- Once the project is created, go into **`Library`**
- Under the **`Other Popular APIs`** section, enable `URL Shortener API` and `Custom Search API`
- Under the **`YouTube APIs`** section, enable `YouTube Data API`
- Under the **`Google Maps APIs`** section, enable `Google Maps Geocoding API` and `Google Maps Time Zone API`
- On the left tab, access **`Credentials`**,
- Click `Create Credentials` button,
- Click on `API Key`
- A new window will appear with your `Google API key`
*NOTE: You don't really need to click on `RESTRICT KEY`, just click on `CLOSE` when you are done.*
- Copy the key.
- Open up **`credentials.json`** and look for **`"GoogleAPIKey"`**, paste your API key inbetween the quotation marks.
```
It should look like:
```
```json
"GoogleApiKey": "AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM",
```
- **MashapeKey**
- Required for Urban Disctionary, Hashtag search, and Hearthstone cards.
- You need to create an account on their [api marketplace](https://market.mashape.com/), after that go to `market.mashape.com/YOURNAMEHERE/applications/default-application` and press **Get the keys** in the top right corner.
- Copy the key and paste it into `credentials.json` - Copy the key and paste it into `credentials.json`
- **LOLAPIKey** - Required for all League of Legends commands. - **LOLAPIKey**
You can get this key [here](http://api.champion.gg/) - Required for all League of Legends commands.
- **OsuAPIKey** - Required for Osu commands - You can get this key [here](http://api.champion.gg/)
You can get this key [here](https://osu.ppy.sh/p/api) **You will need to log in and like the soundcloud it may take a few tries** - **OsuAPIKey**
- **CarbonKey** -This key is for Carobnitex.net stats. - Required for Osu commands
Most likely unnecessary **Needed only if your bot is listed on Carbonitex.net** - You can get this key [here.](https://osu.ppy.sh/p/api)
*You will need to log in and like the soundcloud it may take a few tries.*
- **TotalShards**
- Required if the bot will be connected to more than 1500 servers.
- Most likely unnecessary to change until your bot is added to more than 1500 servers.
Additional options -----
====================
- **TotalShards** - Required if the bot will be connected to more than 2500 servers
Most likely unnecessary to change until your bot is added to more than 2000 servers
[//]: # (- **Db** - Allows for advanced database configuration )
[//]: # ( - Leave this with the `null` value for standard operation - change this to `examples` to [This is only a comment so doesn't need proper detail])
## DB files
DB files Nadeko saves all the settings and infomations in `NadekoBot.db` file here:
======== `NadekoBot\src\NadekoBot\bin\Release\netcoreapp1.1\data\NadekoBot.db` (NadekoBot v1.4x)
Nadeko uses few db files in order to open these database files `NadekoBot\src\NadekoBot\bin\Release\netcoreapp1.0\data\NadekoBot.db` (1.X) you will need [DB Browser for SQLite](http://sqlitebrowser.org/). in order to open the database file you will need [DB Browser for SQLite](http://sqlitebrowser.org/).
To make changes To make changes
- Copy the `NadekoBot.db` to someplace safe. (Back up)
- Open `NadekoBot.db`
- go to **Browse Data** tab - go to **Browse Data** tab
- click on **Table** drop-down list - click on **Table** drop-down list
- choose the table you want to edit - choose the table you want to edit
@ -75,4 +168,6 @@ and that will save all the changes.
![nadekodb](https://cdn.discordapp.com/attachments/251504306010849280/254067055240806400/nadekodb.gif) ![nadekodb](https://cdn.discordapp.com/attachments/251504306010849280/254067055240806400/nadekodb.gif)
[CleverBot APIs]: https://cleverbot.io/keys [Google Console]: https://console.developers.google.com
[DiscordApp]: https://discordapp.com/developers/applications/me
[Invite Guide]: http://discord.kongslien.net/guide.html

View File

@ -1,9 +1,9 @@
## Setting up NadekoBot on Linux ## Setting up NadekoBot on Linux
#### Setting up NadekoBot on Linux Digital Ocean Droplet **Setting up NadekoBot on Linux Digital Ocean Droplet**
If you want Nadeko to play music for you 24/7 without having to hosting it on your PC and want to keep it cheap, reliable and convenient as possible, you can try Nadeko on Linux Digital Ocean Droplet using the link [DigitalOcean](http://m.do.co/c/46b4d3d44795/) (and using this link will be supporting Nadeko and will give you **$10 credit**) If you want Nadeko to play music for you 24/7 without having to hosting it on your PC and want to keep it cheap, reliable and convenient as possible, you can try Nadeko on Linux Digital Ocean Droplet using the link [DigitalOcean](http://m.do.co/c/46b4d3d44795/) (and using this link will be supporting Nadeko and will give you **$10 credit**)
#### Setting up NadekoBot **Setting up NadekoBot**
Assuming you have followed the link above to setup an account and Droplet with 64bit OS in Digital Ocean and got the `IP address and root password (in email)` to login, its time to get started. Assuming you have followed the link above to setup an account and Droplet with 64bit OS in Digital Ocean and got the `IP address and root password (in email)` to login, its time to get started.
**Go through this whole guide before setting up Nadeko** **Go through this whole guide before setting up Nadeko**
@ -11,31 +11,21 @@ Assuming you have followed the link above to setup an account and Droplet with 6
#### Prerequisites #### Prerequisites
- Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) - Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
- Download [WinSCP](https://winscp.net/eng/download.php) *(optional)* - Download [WinSCP](https://winscp.net/eng/download.php) *(optional)*
- Create and Invite the bot.
- Read here how to [create a Discord Bot application and invite it.](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#creating-discord-bot-application)
#### Starting up #### Starting up
- **Open PuTTY.exe** that you downloaded before, and paste or enter your `IP address` and then click **Open**. - **Open PuTTY.exe** that you downloaded before, and paste or enter your `IP address` and then click **Open**.
If you entered your Droplets IP address correctly, it should show **login as:** in a newly opened window. If you entered your Droplets IP address correctly, it should show **login as:** in a newly opened window.
- Now for **login as:**, type `root` and hit enter. - Now for **login as:**, type `root` and press enter.
- It should then, ask for password, type the `root password` you have received in your **email address registered with Digital Ocean**, then hit Enter. - It should then, ask for password, type the `root password` you have received in your **email address registered with Digital Ocean**, then press Enter.
*as you are running it for the first time, it will most likely to ask you to change your root password, for that, type the "password you received through email", hit Enter, enter a "new password", hit Enter and confirm that "new password" again.* If you are running your VPS/ droplet for the first time, it will most likely ask you to change your VPS root password, to do that, type the **password you received through email** it won't show any changes on the screen like `******` when password is being typed, press Enter once done.
**SAVE that new password somewhere safe, not just in your mind**. After you've done that, you are ready to write commands. Type a **new password**, press Enter and type the **new password** again and you're done.
**Write down and save the new password somewhere safe.**
After you've done that, you are ready to use your VPS.
**NOTE:** Copy the commands, and just paste them using **mouse single right-click.**
#### Creating and Inviting bot
- Read here how to [create a DiscordBot application](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#creating-discordbot-application)
- [Visual Invite Guide](http://discord.kongslien.net/guide.html) **(Note: Client ID is your Bot ID)**
- Copy your `Client ID` from your [applications page](https://discordapp.com/developers/applications/me).
- Replace the **12345678** in this link:
`https://discordapp.com/oauth2/authorize?client_id=`12345678`&scope=bot&permissions=66186303`
with your `Client 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.
#### Getting NadekoBot #### Getting NadekoBot
##### Part I - Downloading the installer ##### Part I - Downloading the installer
@ -62,8 +52,7 @@ Welcome to NadekoBot Auto Prerequisites Installer.
Would you like to continue? Would you like to continue?
``` ```
That will install all the prerequisites your system need to run NadekoBot. That will install all the prerequisites your system need to run NadekoBot.
(Optional) **If** you want to install it manually, you can try finding it [here.](https://github.com/Kwoth/NadekoBot-BashScript/blob/1.4/nadekoautoinstaller.sh)
(Optional) **If** you want to install it manually, you can try finding it [here](https://github.com/Kwoth/NadekoBot-BashScript/blob/1.4/nadekoautoinstaller.sh)
Once *prerequisites* finish installing, Once *prerequisites* finish installing,
@ -77,21 +66,20 @@ When installation is complete, you will see the options again.
Next, check out: Next, check out:
##### Part IV - Setting up credentials ##### Part IV - Setting up credentials
- [1. Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#setting-up-credentialsjson) - [1. Set up credentials.json](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
- [2. To Get the Google API](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music) - [2. Get the Google API](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
- [3. JSON Explanations for other APIs](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
You will need the following for the next step: You will need the following for the next step:
![botimg](https://cdn.discordapp.com/attachments/251504306010849280/276455844223123457/Capture.PNG) ![botimg](https://cdn.discordapp.com/attachments/251504306010849280/276455844223123457/Capture.PNG)
- **Bot's Client ID** and **Bot's ID** (both are same) [(*required)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file) - **Bot's Client ID** and **Bot's ID** (both are same) [(*required)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
- **Bot's Token** (not client secret) [(*required)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file) - **Bot's Token** (not client secret) [(*required)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
- Your **Discord userID** [(*required)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file) - Your **Discord userID** [(*required)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
- **Google Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music) - **Google Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
- **LoL Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/) - **LoL Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
- **Mashape Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/) - **Mashape Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
- **Osu Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/) - **Osu Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
- **Sound Cloud Client Id** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/) - **Sound Cloud Client Id** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
Once you have acquired them, press `5` to **Set up credentials.json** Once you have acquired them, press `5` to **Set up credentials.json**
@ -155,7 +143,7 @@ You can simply type `.die` in the server you have your NadekoBot to make her res
**Restarting Nadeko with the Server:** **Restarting Nadeko with the Server:**
Open **PuTTY** and login as you have before, type `reboot` and hit Enter. Open **PuTTY** and login as you have before, type `reboot` and press Enter.
**Restarting Manually:** **Restarting Manually:**
@ -174,38 +162,19 @@ Open **PuTTY** and login as you have before, type `reboot` and hit Enter.
- Next, choose either `2` or `3` to run the bot again with **normally** or **auto restart** respectively. - Next, choose either `2` or `3` to run the bot again with **normally** or **auto restart** respectively.
- Done. - Done.
#### Setting up Music #### Additional Information
To set up Nadeko for music and Google API Keys, follow [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music) ##### Setting up Music
Once done, go back to **PuTTY** To set up Nadeko for music and Google API Keys, follow [Setting up your API keys.][setup music]
#### Some more Info ##### tmux
##### Info about 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 **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, replace **“nadeko”** with the session name you created.) - 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, replace **“nadeko”** with the session name you created.)
- If you want to **kill** NadekoBot **session**, type `tmux kill-session -t nadeko` - If you want to **kill** NadekoBot **session**, type `tmux kill-session -t nadeko`
#### Guide for Advance Users (Optional) ##### Setting up SFTP
**Skip this step if you are a Regular User or New to Linux.**
[![img7][img7]](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#getting-nadekobot)
- Right after [Getting NadekoBot](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#getting-nadekobot)
- `cd NadekoBot/src/NadekoBot/` (go to this folder)
- `pico credentials.json` (open credentials.json to edit)
- Insert your bot **Client ID, Bot ID** (should be same as your Client ID) **and Token** if you got it following [Creating and Inviting bot](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#creating-and-inviting-bot).
- Insert your own ID in Owners ID follow: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file)
- And Google API from [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music)
- Once done, press `CTRL+X`
- It will ask for "Save Modified Buffer?", press `Y` for yes
- It will then ask "File Name to Write" (rename), just hit `Enter` and Done.
- You can now move to [Running NadekoBot](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot)
#### Setting up SFTP
- Open **WinSCP** - Open **WinSCP**
- Click on **New Site** (top-left corner). - Click on **New Site** (top-left corner).
@ -218,13 +187,16 @@ Once done, go back to **PuTTY**
- It should show you the NadekoBot folder which was created by git earlier on the right-hand side window. - It should show you the NadekoBot folder which was created by git earlier on the right-hand side window.
- Open that folder, then open the `src` folder, followed by another `NadekoBot` folder and you should see `credentials.json` there. - Open that folder, then open the `src` folder, followed by another `NadekoBot` folder and you should see `credentials.json` there.
#### Setting up credentials.json ##### Setting up credentials.json
- 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/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file) - EDIT it as it is guided here: [Setting up credentials.json][setup credentials]
- Paste/put it back in the folder once done. `(Using WinSCP)` - Paste/put it back in the folder once done. `(Using WinSCP)`
- **If** you already have Nadeko 1.3.x 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.1/data` using WinSCP. - **If** you already have Nadeko 1.3.x 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.1/data` using WinSCP.
- **If** you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/) **Or** follow the [Upgrading Guide.][upgrading]
[img7]: https://cdn.discordapp.com/attachments/251504306010849280/251505766370902016/setting_up_credentials.gif [img7]: https://cdn.discordapp.com/attachments/251504306010849280/251505766370902016/setting_up_credentials.gif
[setup credentials]: http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file
[setup music]: http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys
[upgrading]: http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/

View File

@ -2,8 +2,7 @@
#### Prerequisites #### Prerequisites
- [Homebrew][Homebrew] - [Homebrew][Homebrew]
- Google Account - [Google Account](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
- Soundcloud Account (if you want soundcloud support)
- Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom] - Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom]
#### Installing Homebrew #### Installing Homebrew
@ -70,54 +69,56 @@ Next, choose `6` to exit.
#### Creating and Inviting bot #### Creating and Inviting bot
- Read here how to [create a DiscordBot application](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#creating-discordbot-application) - Read here [how to create a Discord Bot application and invite it.](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#creating-discord-bot-application)
- [Visual Invite Guide](http://discord.kongslien.net/guide.html) *NOTE: Client ID is your Bot ID*
- Copy your `Client ID` from your [applications page](https://discordapp.com/developers/applications/me).
- Replace the `12345678` in this link `https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303` with your `Client 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 #### Setting up Credentials.json file
- Open up the `NadekoBot` folder, which should be in your home directory, then `NadekoBot` folder then `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.
- EDIT it as it is guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file) - Edit the way its guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
- **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`. - **If** you already have Nadeko 1.x 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.1/data`.
- **If** you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/) **Or** follow the [Upgrading Guide.](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/)
#### Setting NadekoBot Music #### Setting NadekoBot Music
For Music Setup and API keys check [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music) and [JSON Explanations](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/). For Music Setup and API keys check [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys) and [JSON Explanations](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/).
#### Running NadekoBot #### Running NadekoBot
- Using tmux **Create a new Session:**
`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 - Using Screen
`screen -S nadeko` `screen -S nadeko`
^this will create a new screen named “nadeko” - Using tmux
`(you can replace “nadeko” with anything you prefer and remember its your screen name)`.
- Start Nadeko using .NET Core: `tmux new -s nadeko`
`cd ~ && bash linuxAIO.sh` 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.
From the options, **Next, we need to run `linuxAIO.sh` in order to get the latest running scripts with patches:**
Choose `2` To Run the bot normally. - `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
**NOTE:** With option `2` (Running Normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/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.)
Choose `3` To Run the bot with Auto Restart. **From the options,**
**NOTE:** With option `3` (Running with Auto Restart), bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/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/latest/guides/OSX%20Guide/#some-more-info) Choose `2` to **Run NadekoBot normally.**
**NOTE:** With option `2` (Running normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/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.)
Choose `3` to **Run NadekoBot with Auto Restart.**
**NOTE:** With option `3` (Running with Auto Restart), bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) making the command `.die` to function as restart.
It will show you the following options:
```
1. Run Auto Restart normally without Updating.
2. Run Auto Restart and update NadekoBot.
3. Exit
```
- With option `1. Run Auto Restart normally without Updating.` Bot will restart on `die` command and will not be downloading the latest build available.
- With option `2. Run Auto Restart and update NadekoBot.` Bot will restart and download the latest build of bot available everytime `die` command is used.
**Remember** that, while running with Auto Restart, you will need to [close the tmux session](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#restarting-nadeko) to stop the bot completely.
**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) 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)

View File

@ -3,52 +3,24 @@
#### Prerequisites #### Prerequisites
- [Notepad++][Notepad++] (or some other decent text editor) - [Notepad++][Notepad++] (or some other decent text editor)
- Windows 8 or later - Windows 8 or later
- [Create Discord Bot application](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#creating-discord-bot-application) and [Invite the bot to your server](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#inviting-your-bot-to-your-server).
#### Guide #### Guide
- Download and run the [NadekoBot Updater][Updater] - Download and run the [NadekoBot Updater.][Updater]
- Press 'Install ffmpeg' button if you want music features - Press **`Install ffmpeg`** button if you want music features.
*note: RESTART YOUR PC IF YOU DO* ***NOTE:** RESTART YOUR PC IF YOU DO.*
- Press `Update` and go through the installation wizard - Press **`Update`** and go through the installation wizard.
*note: If you're upgrading from 1.3, DO NOT select your old nadekobot folder. Install it in a separate directory and read the upgrading guide* ***NOTE:** If you're upgrading from 1.3, DO NOT select your old nadekobot folder. Install it in a separate directory and read the [upgrading guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/).*
- When installation is finished, make sure 'open credentials.json' is checked. - When installation is finished, make sure **`Open credentials.json`** is checked.
*note: Make sure to open it with Notepad++ or some other decent text editor.* ***NOTE:** Make sure to open it with Notepad++ or some other decent text editor.*
- [Set up credentials.json](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file) file.
#### Creating DiscordBot application
- Go to [the Discord developer application page][DiscordApp].
- Log in with your Discord account.
- 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).
- Create the application.
- 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.
![img2](http://i.imgur.com/x3jWudH.gif)
#### Setting up credentials.json file
- In there you will see fields such as `Token`, `ClientId`, 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. (Note: Make sure that you actually use a Token and not a Client Secret! It is in the **App Bot User** tab.)
- 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.
- 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 appear 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 ID (By default, the ID is `105635576866156544`) on the `OwnerIds` section with your user ID shown earlier.
- Save `credentials.json`
- 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.
![img3](http://i.imgur.com/QwKMnTG.gif)
#### Inviting your bot to your server
- [Invite Guide][Invite Guide]
- Copy your `Client ID` from your [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`.
- 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.
![img4](http://i.imgur.com/aFK7InR.gif)
#### Starting the bot #### Starting the bot
- Either press "Start" Button in the updater, or run the bot via it's desktop shortcut. - Either press **`Start`** Button in the updater, or run the bot via it's desktop shortcut.
#### 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).
- Open NadekoBot Updater - Open NadekoBot Updater
- If updates are available, you will be able to click on the Update button - If updates are available, you will be able to click on the Update button
- Start the bot - Start the bot