Guides -> 1.0
It took so long after the last mention since I was too stubborn to just do this from a local git client for too long. Linux and OS X guides both have things built one by one for now and I'll only re-release the windows updater once I get the A-OK for not having to build things one by one.
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
### Setting Up NadekoBot on OSX
|
||||
#### Prerequisites
|
||||
- 1) [Homebrew][Homebrew]
|
||||
- 2) Mono
|
||||
- 3) Google Account
|
||||
- 4) Soundcloud Account (if you want soundcloud support)
|
||||
- 5) Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom]
|
||||
- 2) Google Account
|
||||
- 3) Soundcloud Account (if you want soundcloud support)
|
||||
- 4) Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom]
|
||||
|
||||
####Installing Homebrew
|
||||
|
||||
@ -16,6 +15,7 @@ Run `brew update` to fetch the latest package data.
|
||||
brew install git
|
||||
brew install ffmpeg
|
||||
brew update && brew upgrade ffmpeg
|
||||
brew install openssl
|
||||
brew install opus
|
||||
brew install opus-tools
|
||||
brew install opusfile
|
||||
@ -24,6 +24,12 @@ brew install libsodium
|
||||
brew install tmux
|
||||
```
|
||||
|
||||
####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/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.
|
||||
|
||||
####Check your `FFMPEG`
|
||||
|
||||
**In case your `FFMPEG` wasnt installed properly**
|
||||
@ -42,124 +48,104 @@ 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.
|
||||
|
||||
####Installing Mono
|
||||
- Building Mono dependencies:
|
||||
|
||||
`brew install autoconf automake libtool pkg-config`
|
||||
|
||||
- Building Mono from Source:
|
||||
|
||||
To build Mono from a Git Source Code checkout, you will want to have the official Mono installed on the system, as the build requires a working C# compiler to run. Once you do this, run the following commands, remember to replace PREFIX with your installation prefix that you selected:
|
||||
|
||||
```
|
||||
PATH=$PREFIX/bin:$PATH
|
||||
git clone https://github.com/mono/mono.git
|
||||
cd mono
|
||||
CC='cc -m32' ./autogen.sh --prefix=$PREFIX --disable-nls --build=i386-apple-darwin11.2.0
|
||||
make
|
||||
make install
|
||||
```
|
||||
To build Mono in 64 bit mode instead use this to configure the build:
|
||||
|
||||
`./autogen.sh --prefix=$PREFIX --disable-nls`
|
||||
|
||||
####Nadeko Setup
|
||||
- Create a new folder and name it `Nadeko`.
|
||||
- Move to our `Nadeko` folder
|
||||
|
||||
`cd Nadeko`
|
||||
- Go to [Releases][Releases] and copy the zip file address of the lalest version available, it should look like `https://github.com/Kwoth/NadekoBot/releases/download/vx.xx/NadekoBot.vx.x.zip`
|
||||
- Get the correct link, type `curl -O` and past the link, then hit `Enter`
|
||||
- It should be something like this:
|
||||
|
||||
`curl -O https://github.com/Kwoth/NadekoBot/releases/download/vx.xx/NadekoBot.vx.x.zip`
|
||||
|
||||
^ do not copy-paste it
|
||||
|
||||
- Unzip the downloaded file in our `Nadeko` folder
|
||||
####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
|
||||
|
||||
####Creating DiscordBot application
|
||||
- Go to [DiscordApp][DiscordApp].
|
||||
- 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.
|
||||
- Once the application is created, click on `Create a Bot User` and confirm it.
|
||||
- Click on `Create a Bot User` and confirm it.
|
||||
- Keep this window open for now.
|
||||
|
||||
####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`.
|
||||
- Open the file with your Text editor.
|
||||
- In there you will see fields like `Token`, `ClientId`, `BotId`, `OwnerIDs`.
|
||||
- In your [DiscordApp][DiscordApp], under `Bot User` part, you will see the `Token:click to reveal` part, click to reveal it.
|
||||
- Copy your bot's token, and put it between `" "` in your `credentials.json` file.
|
||||
- Copy `Client ID` and replace it with the example one in your `credentials.json` in `Client ID` **and** `BotID` field.
|
||||
- Save your `credentials.json` but keep it open. We need to put your `User ID` and owner.
|
||||
- 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.
|
||||
|
||||
####Running NadekoBot
|
||||
- Copy/past and hit `Enter`
|
||||
|
||||
`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)`.
|
||||
^this will create a new session named “nadeko”
|
||||
`(you can replace “nadeko” with anything you prefer and remember its your session name)`.
|
||||
|
||||
or if you want to use Screen, run:
|
||||
|
||||
`screen -S nadeko`
|
||||
|
||||
^this will create a new screen named “nadeko” `(you can replace “nadeko” with anything you prefer and remember its your
|
||||
screen name)`.
|
||||
^this will create a new screen named “nadeko”
|
||||
`(you can replace “nadeko” with anything you prefer and remember its your screen name)`.
|
||||
|
||||
`cd nadeko`
|
||||
`cd ~/NadekoBot/src/NadekoBot/`
|
||||
|
||||
- Start NadekoBot.exe using Mono:
|
||||
- Start Nadeko using dotnet:
|
||||
|
||||
`mono NadekoBot.exe`
|
||||
`dotnet run --configuration Release`
|
||||
|
||||
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)
|
||||
|
||||
*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)*
|
||||
|
||||
####Inviting your bot to your server - [Invite Guide][Invite Guide]
|
||||
- Create a new server in Discord.
|
||||
- Copy your `Client ID` from your [DiscordApp][DiscordApp].
|
||||
- Replace `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`.
|
||||
- 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`.
|
||||
- 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`.
|
||||
- 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.
|
||||
- Close `NadekoBot.exe`
|
||||
- Replace your `User ID` in the `credentials.json` between `[ ]` and save the changes.
|
||||
- Run `NadekoBot.exe` again.
|
||||
- Now you are 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.
|
||||
- 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](Windows Guide.md#setting-up-nadekobot-for-music) and [JSON Explanations](JSON Explanations.md).
|
||||
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/).
|
||||
|
||||
####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
|
||||
|
||||
`cd ~/NadekoBot/ && git init && git pull`
|
||||
|
||||
####Some more Info - 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 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 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 kill NadekoBot session, type `tmux kill-session -t nadeko`
|
||||
|
||||
####Some more Info - Screen
|
||||
|
||||
-If you want to see the sessions after logging back again, type `screen -ls`, and that will give you the list of screens.
|
||||
-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 see the sessions after logging back again, type `screen -ls`, and that will give you the list of screens.
|
||||
- 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`
|
||||
|
||||
[Homebrew]: http://brew.sh/
|
||||
[Mono]: http://www.mono-project.com/docs/compiling-mono/mac/
|
||||
[Releases]: https://github.com/Kwoth/NadekoBot/releases
|
||||
[DiscordApp]: https://discordapp.com/developers/applications/me
|
||||
[Atom]: https://atom.io/
|
||||
[Invite Guide]: http://discord.kongslien.net/guide.html
|
||||
|
Reference in New Issue
Block a user