This commit is contained in:
Kwoth 2016-10-26 16:31:21 +02:00
commit 7941dec165
4 changed files with 81 additions and 102 deletions

View File

@ -15,15 +15,16 @@ If you do not see `credentials.json` you will need to rename `credentials_exampl
"MashapeKey": "",
"OsuApiKey": "",
"SoundCloudClientId": "",
"CarbonKey": "",
"Db": null,
"TotalShards": 1
}
```
####Required Parts
+ **Token** - Required to log in. Refer to this [guide](http://discord.kongslien.net/guide.html)
+ **OwnerIds** - Required for the **Owner-Only** commands. Seperate multiple Id's with a comma.
+ **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.**
- **Token** - Required to log in. Refer to this [guide](http://discord.kongslien.net/guide.html)
- **OwnerIds** - Required for the **Owner-Only** commands. Seperate multiple Id's with a comma.
- **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
run the bot then do `.uid @MyBotName` - this will give you your bot_id.
@ -32,26 +33,28 @@ Do the same for yourself with `.uid @MyName` Put these numbers in their respecti
Setting up your API keys
====================
####This part is completely optional, **However it is necessary for music to work properly**
+ **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)
+ **SoundCloudClientID** - Required to queue soundloud songs from sc links.
+ You will need to create a new app [here](http://soundcloud.com/you/apps). **Please note you must be logged into SoundCloud**
+ Simply click Register a new application and enter a name.
+ Copy the Client ID and click "save app" then paste the Client Id it into your `credentials.json`
+ **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`
+ **LOLAPIKey** - Required for all League of Legends commands.
+ You can get this key [here](http://api.champion.gg/)
+ **OsuAPIKey** - Required for Osu commands
+ 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**
- **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)
- **SoundCloudClientID** - Required to queue soundloud songs from sc links.
- You will need to create a new app [here](http://soundcloud.com/you/apps). **Please note you must be logged into SoundCloud**
- Simply click Register a new application and enter a name.
- Copy the Client ID and click "save app" then paste the Client Id it into your `credentials.json`
- **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`
- **LOLAPIKey** - Required for all League of Legends commands.
- You can get this key [here](http://api.champion.gg/)
- **OsuAPIKey** - Required for Osu commands
- 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**
- **CarbonKey** -This key is for Carobnitex.net stats.
- Most likely unnecessary **Needed only if your bot is listed on Carbonitex.net**
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])
- **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])
Config.json

View File

@ -72,55 +72,25 @@ echo "deb http://ftp.debian.org/debian jessie-backports main" | tee /etc/apt/sou
sudo apt-get update && sudo apt-get install ffmpeg -y`
```
####Uncomplicated Firewall UFW
**5)**
`apt-get install ufw`
**It is likely to have been pre-installed so if you see that it is installed, check it works with the following command, and/or enable it**
**6)**
`ufw status`
**7)**
`ufw enable`
**Type** `y` ** and hit Enter**
**8)**
`sudo ufw allow ssh`
####Installing TMUX
**9)**
**5)**
`sudo apt-get install tmux -y`
####Getting NadekoBot
**10)**
**6)**
- `cd ~`
- `curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh`
*Skip steps 10.5-11.5 and continue to run the bot, if you see errors while running, do the steps (10.5-11.5) below:*
**10.5)**
- `cd ~ && git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
####Building NadekoBot
**11)**
- `cd ~/NadekoBot/ && dotnet restore && cd ~/NadekoBot/src/NadekoBot/ && dotnet build --configuration Release`
*if you see error, try:*
**11.5)**
- `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`
**If you do not get any errors using the above steps move to the next section, Setting up NadekoBot otherwise, if you get errors follow step 6.1**
**6.1)**
- `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`
**If you still get some errors using the above steps, follow step 6.2**
**6.2)**
- `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`
####Setting up NadekoBot
@ -143,16 +113,24 @@ sudo apt-get update && sudo apt-get install ffmpeg -y`
- 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.
####Inviting your bot to your server
- [Invite Guide](http://discord.kongslien.net/guide.html)
- 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.
####Running NadekoBot
Go back to **PuTTY**, `(hope its still running xD)`
Go back to **PuTTY**
**12)**
**7)**
`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)* so you can run the bot in background without having to keep running PuTTY in the background.
**13)**
**8)**
- `cd NadekoBot/src/NadekoBot/`
- `dotnet run --configuration Release`
@ -165,9 +143,6 @@ For how to set up Nadeko for music and Google API Keys, follow [Setting up Nadek
Now time to **move 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.
Copy your CLIENT ID (In the same Developer page where you got your token!) and replace `12345678` in this link: `https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303` with it.
Go to that link and you will be able to add your bot to your server.
**NOW YOU HAVE YOUR OWN NADEKO BOT** `Thanks to Kwoth <3`
####Some more Info (just in case)

View File

@ -1,9 +1,9 @@
### Setting Up NadekoBot on OSX
#### Prerequisites
- 1) [Homebrew][Homebrew]
- 2) Google Account
- 3) Soundcloud Account (if you want soundcloud support)
- 4) Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom]
- [Homebrew][Homebrew]
- Google Account
- Soundcloud Account (if you want soundcloud support)
- Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom]
####Installing Homebrew
@ -59,19 +59,6 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
- `cd ~`
- `curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh`
*If you fail to run the bot with* `METHOD I` *try:*
**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`
####Creating DiscordBot application
- Go to [the Discord developer application page.][DiscordApp]
- Log in with your Discord account.
@ -107,14 +94,12 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
- Using Screen
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)`.
- Start Nadeko using dotnet:
- Start Nadeko using .NET Core:
`cd ~/NadekoBot/src/NadekoBot/`
@ -126,13 +111,13 @@ Now time to move bot to background and to do that, press CTRL+B+D (this will det
*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 [Discord bot applications page.][DiscordApp]
####Inviting your bot to your server
- [Invite Guide](http://discord.kongslien.net/guide.html)
- 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`.
- 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, and click `Authorize`.
- Bot should be added to your server.
- 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 NadekoBot Music
@ -144,16 +129,33 @@ Nadeko is really easy to update as of version 1.0! just copy and paste the comma
`cd ~/NadekoBot/ && git init && git pull`
####Some more Info - TMUX
####Alternative Method to Install Nadeko
*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:*
**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
**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 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
**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 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/

View File

@ -50,12 +50,11 @@ ________________________________________________________________________________
####Inviting your bot to your server
- [Invite Guide][Invite Guide]
- Create a new server in Discord.
- 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**&scope=bot&permissions=66186303`.
- 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 new server.
- The bot should have been added to your server.
####Starting the bot
- Go to the folder which you extracted the zip to earlier, and run the `NadekoRun.bat` file