From bb12c12df7eda5ddaf471214d1348a99631deb9b Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Mon, 17 Apr 2017 12:26:41 -0700 Subject: [PATCH 01/15] Changing pause to timeout - latest Well, with pause, the autorun requires you to press some key to get it running. A little bit of change --- scripts/Latest.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Latest.bat b/scripts/Latest.bat index 13248a96..36c5b3be 100644 --- a/scripts/Latest.bat +++ b/scripts/Latest.bat @@ -162,5 +162,5 @@ GOTO end ECHO. ECHO Installation complete! ECHO. - PAUSE - del Latest.bat \ No newline at end of file + timeout /t 5 + del Latest.bat From db824d23b0e98576db6ce18b238d18fca8ddf386 Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Mon, 17 Apr 2017 12:35:09 -0700 Subject: [PATCH 02/15] Changing PAUSE to timeout - stable Making things smoother for auto-update --- scripts/Stable.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Stable.bat b/scripts/Stable.bat index a3ffb6f4..43f8cf23 100644 --- a/scripts/Stable.bat +++ b/scripts/Stable.bat @@ -162,5 +162,5 @@ GOTO end ECHO. ECHO Installation complete! ECHO. - PAUSE - del Stable.bat \ No newline at end of file + timeout /t 5 + del Stable.bat From e1b9a2c3af0cdae938d29fe9611e6559d203e3b2 Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 17:09:25 -0700 Subject: [PATCH 03/15] Optimizing the guide (I guess?) :thinking: Deleted the manual steps (except for the prerequisite) --- docs/guides/Linux Guide.md | 181 ++----------------------------------- 1 file changed, 9 insertions(+), 172 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 4e168cf4..3d2732dc 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -38,7 +38,7 @@ If you entered your Droplets IP address correctly, it should show **login as:** - The bot should have been added to your server. ####Getting NadekoBot -#####Part I +#####Part I - Downloading the installer Use the following command to get and run `linuxAIO.sh` (Remember **Do Not** rename the file **linuxAIO.sh**) @@ -55,7 +55,9 @@ You should see these following options after using the above command: 6. Set up credentials.json (if you have downloaded the bot already) 7. To exit ``` -#####Part II (Optional) +#####Part II - Downloading Nadekobot prerequisites + +(Optional) **If** you want to install it manually, you can try finding it [here](https://raw.githubusercontent.com/Kwoth/NadekoBot-BashScript/master/nadekoautoinstaller.sh) **If** you are running NadekoBot for the first time on your system and never had any *prerequisites* installed and have Ubuntu, Debian or CentOS, Press `5` and `enter` key, then `y` when you see the following: ``` Welcome to NadekoBot Auto Prerequisites Installer. @@ -63,10 +65,8 @@ Would you like to continue? ``` That will install all the prerequisites your system need to run NadekoBot. -If you prefer to install them [manually](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#installing-manually-optional), click on the link. *(Optional)* - Once *prerequisites* finish installing. -#####Part III +#####Part III - Installing Nadeko Choose either `1` to get the **most updated build of NadekoBot** or @@ -76,8 +76,7 @@ and then press `enter` key. Once Installation is completed you should see the options again. Next, check out: -#####Part IV (Optional) -If you prefer to skip this step and want to do it [manually](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#setting-up-sftp) or already have the `credentials.json` file, click on the link. *(Optional)* +#####Part IV - Setting up credentials - [1. Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#setting-up-credentialsjson) - [2. To Get the Google API](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music) @@ -102,11 +101,11 @@ You will be asked to enter the required informations, just follow the on-screen (If you want to skip any optional infos, just press `enter` key without typing/pasting anything.) Once done, -#####Part V +#####Part V - Checking if Nadeko is working You should see the options again. Next, press `3` to **Run Nadeko (Normally)** Check in your discord server if your new bot is working properly. -#####Part VI +#####Part VI - Running Nadeko on tmux If your bot is working properly in your server, type `.die` to **shut down the bot**, then press `7` to **exit**. Next, [Run your bot again with **tmux**.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot) @@ -147,7 +146,7 @@ See how that happens: **Now check your Discord, the bot should be online** -Next to **move the bot to background** and to do that, press **CTRL+B+D** (that will detach the nadeko session using TMUX) and you can finally close **PuTTY** if you want. +Next to **move the bot to background** and to do that, press **CTRL+B, release, D** (that will detach the nadeko session using TMUX) and you can finally close **PuTTY** if you want. ####Restarting Nadeko @@ -177,167 +176,6 @@ Open **PuTTY** and login as you have before, type `reboot` and hit Enter. - Choose either `3` or `4` to run the bot again with **normally** or **auto restart** respectively. - Done. You can close **PuTTY** now. -####Installing Manually (Optional) - -#####Installing Git - -![img1](https://cdn.discordapp.com/attachments/251504306010849280/251504416019054592/git.gif) - -Ubuntu: - -`sudo apt-get install git -y` - -CentOS: - -`yum -y install git` - -**NOTE:** If the command is not being initiated, hit **Enter** - -#####Installing .NET Core SDK - -![img2](https://cdn.discordapp.com/attachments/251504306010849280/251504746987388938/dotnet.gif) - -Go to [this link](https://www.microsoft.com/net/core#ubuntu) (for Ubuntu) or to [this link](https://www.microsoft.com/net/core#linuxcentos) (for CentOS) provided by microsoft for instructions on how to get the most up to date version of the dotnet core sdk! -Make sure that you're on the correct page for your distribution of linux as the guides are different for the various distributions. -Install the **currently supported version** `1.0.0-preview2-1-003177`. -You can find it [here](https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1-preview2.1-download.md) if you prefer manual installing `dpkg` files. - -We'll go over the steps here for few linux distributions, accurate as of March 08, 2017: -**NOTE:** .NET CORE SDK only supports 64-bit Linux Operating Systems (Raspberry Pis are not supported because of this) - -**Ubuntu x64 17.04 & 16.10** -```sh -sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list' -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 -sudo apt-get update && sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177 -y -``` - -**Ubuntu x64 16.04** -```sh -sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 -sudo apt-get update && sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177 -y -``` - -**Ubuntu x64 14.04** -```sh -sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 -sudo apt-get update && sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177 -y -``` - -**Debian 8 x64** -```sh -sudo apt-get install curl libunwind8 gettext -y -curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835021 -sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet -sudo ln -s /opt/dotnet/dotnet /usr/local/bin -``` - -**CentOS 7 x64** -```sh -sudo yum install libunwind libicu -y -curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835019 -sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet -sudo ln -s /opt/dotnet/dotnet /usr/local/bin -``` - -#####Installing Opus Voice Codec and libsodium - -![img3](https://cdn.discordapp.com/attachments/251504306010849280/251505294654308353/libopus.gif) - -Ubuntu: - -`sudo apt-get install libopus0 opus-tools libopus-dev libsodium-dev -y` - -CentOS: - -`yum -y install opus opus-devel` - -#####Installing FFMPEG - -![img4](https://cdn.discordapp.com/attachments/251504306010849280/251505443111829505/ffmpeg.gif) - -Ubuntu: - -`apt-get install ffmpeg -y` - -Centos: - -```sh -yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm epel-release -yum -y install ffmpeg -``` - -**NOTE:** If you are running **UBUNTU 14.04**, you must run these first: - -```sh -sudo add-apt-repository ppa:mc3man/trusty-media -sudo apt-get update -sudo apt-get dist-upgrade -``` - -**Before executing:** `sudo apt-get install ffmpeg` - - -**NOTE:** If you are running **Debian 8 Jessie**, please, follow these steps: - -```sh -sudo apt-get update -echo "deb http://ftp.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/debian-backports.list -sudo apt-get update && sudo apt-get install ffmpeg -y -``` - -#####Installing TMUX - -![img5](https://cdn.discordapp.com/attachments/251504306010849280/251505519758409728/tmux.gif) - -Ubuntu: - -`sudo apt-get install tmux -y` - -Centos: - -`yum -y install tmux` - -####Guide for Advance Users (Optional) - -**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** -- Click on **New Site** (top-left corner). -- On the right-hand side, you should see **File Protocol** above a drop-down selection menu. -- Select **SFTP** *(SSH File Transfer Protocol)* if its not already selected. -- Now, in **Host name:** paste or type in your `Digital Ocean Droplets IP address` and leave `Port: 22` (no need to change it). -- In **Username:** type `root` -- In **Password:** type `the new root password (you changed at the start)` -- Click on **Login**, it should connect. -- 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. - -####Setting up credentials.json - -- 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) -- Paste/put it back in the folder once done. `(Using WinSCP)` -- **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` using WinSCP. -- **If** you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/) - ####Setting up Music 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) @@ -373,4 +211,3 @@ If you are getting error using the above steps try: 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 ``` -[img7]: https://cdn.discordapp.com/attachments/251504306010849280/251505766370902016/setting_up_credentials.gif From f596e46f6aec0f574f4442abf1206da77c186b7a Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 17:13:34 -0700 Subject: [PATCH 04/15] tfw I basically deleted almost everything Optimized, I guess --- docs/guides/Linux Guide.md | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 3d2732dc..2c16d703 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -57,7 +57,6 @@ You should see these following options after using the above command: ``` #####Part II - Downloading Nadekobot prerequisites -(Optional) **If** you want to install it manually, you can try finding it [here](https://raw.githubusercontent.com/Kwoth/NadekoBot-BashScript/master/nadekoautoinstaller.sh) **If** you are running NadekoBot for the first time on your system and never had any *prerequisites* installed and have Ubuntu, Debian or CentOS, Press `5` and `enter` key, then `y` when you see the following: ``` Welcome to NadekoBot Auto Prerequisites Installer. @@ -65,6 +64,8 @@ Would you like to continue? ``` 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://raw.githubusercontent.com/Kwoth/NadekoBot-BashScript/master/nadekoautoinstaller.sh) + Once *prerequisites* finish installing. #####Part III - Installing Nadeko Choose either @@ -189,25 +190,3 @@ Once done, go back to **PuTTY** - 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` - -#####Alternative way to Install - -If the [Nadeko installer](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#getting-nadekobot) shows any kind error, check if you have the `linuxAIO.sh` file and make sure its not renamed or if you want to manually install the bot. Use the following command(s): - -![img6](https://cdn.discordapp.com/attachments/251504306010849280/251505587089571850/getting_nadeko.gif) - -`cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh` - -**OR** - -```sh -cd ~ && git clone -b dev --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 are getting error using the above steps try: - -```sh -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 -``` From 56587028013a0cb568d2229e5e90cab2636d3c7a Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 17:18:07 -0700 Subject: [PATCH 05/15] Slight changes Well, wget is one of the dependencies too right? --- docs/guides/OSX Guide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index 366a5319..c5cdd329 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -14,6 +14,7 @@ Run `brew update` to fetch the latest package data. ####Installing dependencies ``` +brew install wget brew install git brew install ffmpeg brew update && brew upgrade ffmpeg From 3fff43206f8018fe2062ea9e7b41a242a800807b Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 19:05:45 -0700 Subject: [PATCH 06/15] Added gifs Because why not? :3 --- docs/guides/Windows Guide.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/guides/Windows Guide.md b/docs/guides/Windows Guide.md index 5902c062..56ca531b 100644 --- a/docs/guides/Windows Guide.md +++ b/docs/guides/Windows Guide.md @@ -24,6 +24,7 @@ ________________________________________________________________________________ - Wait a while for the file to finish installing, it'll display it's progress in the command prompt. - You should now have a new folder named `NadekoBot` inside the `Nadeko` folder we previously created. - Once Installation is completed, press any key to close the command prompt. +![img1](http://i.imgur.com/O1dY9eW.gif) ####Creating DiscordBot application - Go to [the Discord developer application page][DiscordApp]. @@ -33,6 +34,7 @@ ________________________________________________________________________________ - 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 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.) @@ -48,6 +50,7 @@ ________________________________________________________________________________ - 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` (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. +![img3](http://i.imgur.com/QwKMnTG.gif) ####Inviting your bot to your server - [Invite Guide][Invite Guide] @@ -56,6 +59,7 @@ ________________________________________________________________________________ - 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 - Go to the `Nadeko` folder that we have created earlier, and run the `NadekoInstaller.bat` file as Administrator. From 85275a74c8fe8cb14e6903cc7d0dfcb7f1e1f418 Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 22:58:46 -0700 Subject: [PATCH 07/15] More changes to linux guide on samvaio's tips --- docs/guides/Linux Guide.md | 71 ++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 2c16d703..1575484f 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -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**) -####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. **Go through this whole guide before setting up Nadeko** @@ -12,7 +12,7 @@ Assuming you have followed the link above to setup an account and Droplet with 6 - Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) - Download [WinSCP](https://winscp.net/eng/download.php) *(optional)* -####Starting up +#### Starting up - **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. @@ -24,7 +24,7 @@ If you entered your Droplets IP address correctly, it should show **login as:** **NOTE:** Copy the commands, and just paste them using **mouse single right-click.** -####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) - [Visual Invite Guide](http://discord.kongslien.net/guide.html) **(Note: Client ID is your Bot ID)** @@ -37,8 +37,8 @@ If you entered your Droplets IP address correctly, it should show **login as:** - 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 -#####Part I - Downloading the installer +#### Getting NadekoBot +##### Part I - Downloading the installer Use the following command to get and run `linuxAIO.sh` (Remember **Do Not** rename the file **linuxAIO.sh**) @@ -55,7 +55,7 @@ You should see these following options after using the above command: 6. Set up credentials.json (if you have downloaded the bot already) 7. To exit ``` -#####Part II - Downloading Nadekobot prerequisites +##### Part II - Downloading Nadekobot prerequisites **If** you are running NadekoBot for the first time on your system and never had any *prerequisites* installed and have Ubuntu, Debian or CentOS, Press `5` and `enter` key, then `y` when you see the following: ``` @@ -64,7 +64,7 @@ Would you like to continue? ``` 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://raw.githubusercontent.com/Kwoth/NadekoBot-BashScript/master/nadekoautoinstaller.sh) +(Optional) **If** you want to install it manually, you can try finding it [here](https://github.com/Kwoth/NadekoBot-BashScript/blob/master/nadekoautoinstaller.sh) Once *prerequisites* finish installing. #####Part III - Installing Nadeko @@ -77,7 +77,7 @@ and then press `enter` key. Once Installation is completed you should see the options again. 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) - [2. To Get the Google API](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music) @@ -149,7 +149,7 @@ See how that happens: Next to **move the bot to background** and to do that, press **CTRL+B, release, D** (that will detach the nadeko session using TMUX) and you can finally close **PuTTY** if you want. -####Restarting Nadeko +#### Restarting Nadeko **Restarting NadekoBot:** @@ -166,7 +166,7 @@ Open **PuTTY** and login as you have before, type `reboot` and hit Enter. - `tmux kill-session -t nadeko` (don't forget to replace "nadeko" to what ever you named your bot's session) - [Run the bot again.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot) -####Updating Nadeko +#### Updating Nadeko - Connect to the terminal through **PuTTY**. - `tmux kill-session -t nadeko` (don't forget to replace **nadeko** in the command with the name of your bot's session) @@ -177,16 +177,57 @@ Open **PuTTY** and login as you have before, type `reboot` and hit Enter. - Choose either `3` or `4` to run the bot again with **normally** or **auto restart** respectively. - Done. You can close **PuTTY** now. -####Setting up Music +#### Setting up Music 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) Once done, go back to **PuTTY** -####Some more Info +#### Some more Info -#####Info about 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 **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` + +####Guide for Advance Users (Optional) + +**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** +- Click on **New Site** (top-left corner). +- On the right-hand side, you should see **File Protocol** above a drop-down selection menu. +- Select **SFTP** *(SSH File Transfer Protocol)* if its not already selected. +- Now, in **Host name:** paste or type in your `Digital Ocean Droplets IP address` and leave `Port: 22` (no need to change it). +- In **Username:** type `root` +- In **Password:** type `the new root password (you changed at the start)` +- Click on **Login**, it should connect. +- 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. + +#### Setting up credentials.json + +- 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) +- Paste/put it back in the folder once done. `(Using WinSCP)` +- **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` using WinSCP. +- **If** you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/) + + +[img7]: https://cdn.discordapp.com/attachments/251504306010849280/251505766370902016/setting_up_credentials.gif From 0221678d35ec2518d43eed835068eabdba6a896e Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 23:06:22 -0700 Subject: [PATCH 08/15] Oops, missed a few lines --- docs/guides/Linux Guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 1575484f..3a042695 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -8,7 +8,7 @@ Assuming you have followed the link above to setup an account and Droplet with 6 **Go through this whole guide before setting up Nadeko** -####Prerequisites +#### Prerequisites - Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) - Download [WinSCP](https://winscp.net/eng/download.php) *(optional)* @@ -112,7 +112,7 @@ Next, [Run your bot again with **tmux**.](http://nadekobot.readthedocs.io/en/lat [Check this when you need to **restart** your **NadekoBot** anytime later along with tmux session.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#restarting-nadeko) -####Running NadekoBot +#### Running NadekoBot **Create a new Session:** From 4989a7db020492c4398670cf50a2010cb079cc05 Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 23:08:18 -0700 Subject: [PATCH 09/15] Just a bit more --- docs/guides/OSX Guide.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index c5cdd329..db24f0a3 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -6,13 +6,13 @@ - Soundcloud Account (if you want soundcloud support) - Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom] -####Installing Homebrew +#### Installing Homebrew ```/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 +#### Installing dependencies ``` brew install wget brew install git @@ -27,7 +27,7 @@ brew install libsodium brew install tmux ``` -####Installing .NET Core SDK +#### 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/` @@ -35,7 +35,7 @@ brew install tmux - Open the `.pkg` file you downloaded and install it. - `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin` -####Check your `FFMPEG` +#### Check your `FFMPEG` **In case your `FFMPEG` wasnt installed properly (Optional)** @@ -46,7 +46,7 @@ brew install tmux - `brew doctor` (Check your Homebrew installation for common issues) - Then try `brew install ffmpeg` again. -####Installing xcode-select +#### Installing xcode-select Xcode command line tools. You will do this in Terminal.app by running the following command line: @@ -54,7 +54,7 @@ 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. -####Downloading and building Nadeko +#### Downloading and building Nadeko Use the following command to get and run `linuxAIO.sh`: (Remember **DO NOT** rename the file `linuxAIO.sh`) @@ -70,7 +70,7 @@ Choose either `1` or `2` then press `enter` key. Once Installation is completed you should see the options again. Next, choose `5` 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) - [Visual Invite Guide](http://discord.kongslien.net/guide.html) *NOTE: Client ID is your Bot ID* @@ -80,17 +80,17 @@ Next, choose `5` to exit. - 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. - EDIT it as it is guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#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 have Nadeko 0.9x 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/). -####Running NadekoBot +#### Running NadekoBot - Using tmux @@ -124,7 +124,7 @@ Choose `4` To Run the bot with Auto Restart. 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) -####Updating Nadeko +#### Updating Nadeko - Connect to the terminal. - `tmux kill-session -t nadeko` [(don't forget to replace **nadeko** in the command to what ever you named your bot's session)](http://nadekobot.readthedocs.io/en/latest/guides/OSX%20Guide/#some-more-info) @@ -135,7 +135,7 @@ If you used Screen press CTRL+A+D (this will detach the nadeko screen) - Choose either `3` or `4` to run the bot again with **normally** or **auto restart** respectively. - Done. You can close terminal now. -####Some more Info +#### Some more Info **TMUX** @@ -149,7 +149,7 @@ If you used Screen press CTRL+A+D (this will detach the nadeko screen) - 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` -####Alternative Method to Install Nadeko +#### Alternative Method to Install Nadeko **METHOD I** From 956ebdb0fd945941c2c98c45cec85fad686d5010 Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 23:09:08 -0700 Subject: [PATCH 10/15] o.o)/ --- docs/guides/Windows Guide.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/guides/Windows Guide.md b/docs/guides/Windows Guide.md index 56ca531b..280f1299 100644 --- a/docs/guides/Windows Guide.md +++ b/docs/guides/Windows Guide.md @@ -13,7 +13,7 @@ ________________________________________________________________________________ - 6) [Notepad++][Notepad++] - 7) Windows 8 or later -####Guide +#### Guide - Make sure you have installed both [Git][Git] and the [.NET Core SDK][.NET Core SDK]. - Create a **new folder** anywhere you like and name it `Nadeko`. - Next, [Right-Click on this link](https://github.com/Kwoth/NadekoBotInstallerWin/raw/master/NadekoInstaller.bat) and select **Save link as** and save the file `NadekoInstaller.bat` inside the `Nadeko` folder that we created earlier. (Please **DO NOT** rename the file `NadekoInstaller.bat`.) @@ -26,7 +26,7 @@ ________________________________________________________________________________ - Once Installation is completed, press any key to close the command prompt. ![img1](http://i.imgur.com/O1dY9eW.gif) -####Creating DiscordBot application +#### Creating DiscordBot application - Go to [the Discord developer application page][DiscordApp]. - Log in with your Discord account. - On the left side, press `New Application`. @@ -36,7 +36,7 @@ ________________________________________________________________________________ - Keep this window open for now. ![img2](http://i.imgur.com/x3jWudH.gif) -####Setting up credentials.json file +#### 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++]. @@ -52,7 +52,7 @@ ________________________________________________________________________________ - 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 +#### 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`. @@ -61,7 +61,7 @@ ________________________________________________________________________________ - The bot should have been added to your server. ![img4](http://i.imgur.com/aFK7InR.gif) -####Starting the bot +#### Starting the bot - Go to the `Nadeko` folder that we have created earlier, and run the `NadekoInstaller.bat` file as Administrator. - From the options, - Choose `3` to **run the bot normally**. @@ -69,7 +69,7 @@ ________________________________________________________________________________ - Choose `4` to **run the bot with auto restart**. (with auto restart the bot will restart itself if it disconnects by the use of `.die` command. Useful if you want to have restart function for any reason.) -####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). - Once that's checked, go to the `Nadeko` folder. - Run the `NadekoInstaller.bat` file. From 07fa82c1fdafc39a96fa77e7ba034be640407d76 Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 23:22:26 -0700 Subject: [PATCH 11/15] One more check .-. --- docs/guides/Linux Guide.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 3a042695..a6346c12 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -66,8 +66,9 @@ 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/master/nadekoautoinstaller.sh) -Once *prerequisites* finish installing. -#####Part III - Installing Nadeko +Once *prerequisites* finish installing, + +##### Part III - Installing Nadeko Choose either `1` to get the **most updated build of NadekoBot** or @@ -102,11 +103,11 @@ You will be asked to enter the required informations, just follow the on-screen (If you want to skip any optional infos, just press `enter` key without typing/pasting anything.) Once done, -#####Part V - Checking if Nadeko is working +##### Part V - Checking if Nadeko is working You should see the options again. -Next, press `3` to **Run Nadeko (Normally)** +Next, press `3` to **Run Nadeko (Normally)**. Check in your discord server if your new bot is working properly. -#####Part VI - Running Nadeko on tmux +##### Part VI - Running Nadeko on tmux If your bot is working properly in your server, type `.die` to **shut down the bot**, then press `7` to **exit**. Next, [Run your bot again with **tmux**.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot) From a59c9d49c052ade7305039541e24c93672e38616 Mon Sep 17 00:00:00 2001 From: DogeOps97 Date: Tue, 18 Apr 2017 23:30:11 -0700 Subject: [PATCH 12/15] <_< Oh please >_> Should be cleaned enough, I think? --- docs/guides/Linux Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index a6346c12..597058c2 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -192,7 +192,7 @@ Once done, go back to **PuTTY** - 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` -####Guide for Advance Users (Optional) +#### Guide for Advance Users (Optional) **Skip this step if you are a Regular User or New to Linux.** From 0210601213bd0585803615dc7a7e195dced953c8 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Fri, 21 Apr 2017 00:20:21 +0200 Subject: [PATCH 13/15] It was a poor joke. --- src/NadekoBot/Modules/NSFW/NSFW.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/NadekoBot/Modules/NSFW/NSFW.cs b/src/NadekoBot/Modules/NSFW/NSFW.cs index 5f45af24..614c1308 100644 --- a/src/NadekoBot/Modules/NSFW/NSFW.cs +++ b/src/NadekoBot/Modules/NSFW/NSFW.cs @@ -212,12 +212,6 @@ namespace NadekoBot.Modules.NSFW public Task Gelbooru([Remainder] string tag = null) => InternalDapiCommand(tag, Searches.Searches.DapiSearchType.Gelbooru); - [NadekoCommand, Usage, Description, Aliases] - public async Task Cp() - { - await Context.Channel.SendMessageAsync("http://i.imgur.com/MZkY1md.jpg").ConfigureAwait(false); - } - [NadekoCommand, Usage, Description, Aliases] public async Task Boobs() { From 5069f04c466f803e944ad015fca1b08c5007e17b Mon Sep 17 00:00:00 2001 From: samvaio Date: Fri, 21 Apr 2017 11:36:24 +0530 Subject: [PATCH 14/15] Commandlist update. `-hgit` Commandlist regenerated. --- docs/Commands List.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/Commands List.md b/docs/Commands List.md index 6c47c7ed..513edd6a 100644 --- a/docs/Commands List.md +++ b/docs/Commands List.md @@ -274,7 +274,6 @@ Commands and aliases | Description | Usage `~rule34` | Shows a random image from rule34.xx with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~rule34 yuri+kissing` `~danbooru` | Shows a random hentai image from danbooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~danbooru yuri+kissing` `~gelbooru` | Shows a random hentai image from gelbooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~gelbooru yuri+kissing` -`~cp` | We all know where this will lead you to. | `~cp` `~boobs` | Real adult content. | `~boobs` `~butts` `~ass` `~butt` | Real adult content. | `~butts` or `~ass` From 3ff989cf92197f7768de1dcc475921c85bea3e73 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 2 May 2017 10:52:15 +0200 Subject: [PATCH 15/15] Patreon id logic change --- .../20170501103455_patreon-id.Designer.cs | 1555 +++++++++++++++++ .../Migrations/20170501103455_patreon-id.cs | 24 + .../NadekoSqliteContextModelSnapshot.cs | 2 + .../Utility/Commands/PatreonCommands.cs | 5 +- .../Services/Database/Models/RewardedUser.cs | 1 + 5 files changed, 1586 insertions(+), 1 deletion(-) create mode 100644 src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs create mode 100644 src/NadekoBot/Migrations/20170501103455_patreon-id.cs diff --git a/src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs b/src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs new file mode 100644 index 00000000..0309c44b --- /dev/null +++ b/src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs @@ -0,0 +1,1555 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using NadekoBot.Services.Database; +using NadekoBot.Services.Database.Models; +using NadekoBot.Modules.Music.Classes; + +namespace NadekoBot.Migrations +{ + [DbContext(typeof(NadekoContext))] + [Migration("20170501103455_patreon-id")] + partial class patreonid + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.Property("UserThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiRaidSetting"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AntiSpamSettingId"); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.HasKey("Id"); + + b.HasIndex("AntiSpamSettingId"); + + b.ToTable("AntiSpamIgnore"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("MessageThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiSpamSetting"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("BlacklistItem"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("BotConfigId1"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("BotConfigId1"); + + b.ToTable("BlockedCmdOrMdl"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BetflipMultiplier"); + + b.Property("Betroll100Multiplier"); + + b.Property("Betroll67Multiplier"); + + b.Property("Betroll91Multiplier"); + + b.Property("BufferSize"); + + b.Property("CurrencyDropAmount"); + + b.Property("CurrencyGenerationChance"); + + b.Property("CurrencyGenerationCooldown"); + + b.Property("CurrencyName"); + + b.Property("CurrencyPluralName"); + + b.Property("CurrencySign"); + + b.Property("DMHelpString"); + + b.Property("DateAdded"); + + b.Property("ErrorColor"); + + b.Property("ForwardMessages"); + + b.Property("ForwardToAllOwners"); + + b.Property("HelpString"); + + b.Property("Locale"); + + b.Property("MigrationVersion"); + + b.Property("MinimumBetAmount"); + + b.Property("OkColor"); + + b.Property("RemindMessageFormat"); + + b.Property("RotatingStatuses"); + + b.Property("TriviaCurrencyReward"); + + b.HasKey("Id"); + + b.ToTable("BotConfig"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BaseDestroyed"); + + b.Property("CallUser"); + + b.Property("ClashWarId"); + + b.Property("DateAdded"); + + b.Property("SequenceNumber"); + + b.Property("Stars"); + + b.Property("TimeAdded"); + + b.HasKey("Id"); + + b.HasIndex("ClashWarId"); + + b.ToTable("ClashCallers"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("EnemyClan"); + + b.Property("GuildId"); + + b.Property("Size"); + + b.Property("StartedAt"); + + b.Property("WarState"); + + b.HasKey("Id"); + + b.ToTable("ClashOfClans"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Mapping"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandAlias"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("Price") + .IsUnique(); + + b.ToTable("CommandPrice"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("InternalTrigger"); + + b.Property("Modifier"); + + b.Property("UnitType"); + + b.HasKey("Id"); + + b.ToTable("ConversionUnits"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Currency"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("CurrencyTransactions"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoDeleteTrigger"); + + b.Property("DateAdded"); + + b.Property("DmResponse"); + + b.Property("GuildId"); + + b.Property("IsRegex"); + + b.Property("OwnerOnly"); + + b.Property("Response"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.ToTable("CustomReactions"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AvatarId"); + + b.Property("DateAdded"); + + b.Property("Discriminator"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasAlternateKey("UserId"); + + b.ToTable("DiscordUser"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Donators"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("EightBallResponses"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildConfigId1"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.HasIndex("GuildConfigId1"); + + b.ToTable("FilterChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Word"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilteredWord"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Type"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FollowedStream"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GCChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoAssignRoleId"); + + b.Property("AutoDeleteByeMessages"); + + b.Property("AutoDeleteByeMessagesTimer"); + + b.Property("AutoDeleteGreetMessages"); + + b.Property("AutoDeleteGreetMessagesTimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages"); + + b.Property("ByeMessageChannelId"); + + b.Property("ChannelByeMessageText"); + + b.Property("ChannelGreetMessageText"); + + b.Property("CleverbotEnabled"); + + b.Property("DateAdded"); + + b.Property("DefaultMusicVolume"); + + b.Property("DeleteMessageOnCommand"); + + b.Property("DmGreetMessageText"); + + b.Property("ExclusiveSelfAssignedRoles"); + + b.Property("FilterInvites"); + + b.Property("FilterWords"); + + b.Property("GameVoiceChannel"); + + b.Property("GreetMessageChannelId"); + + b.Property("GuildId"); + + b.Property("Locale"); + + b.Property("LogSettingId"); + + b.Property("MuteRoleName"); + + b.Property("PermissionRole"); + + b.Property("RootPermissionId"); + + b.Property("SendChannelByeMessage"); + + b.Property("SendChannelGreetMessage"); + + b.Property("SendDmGreetMessage"); + + b.Property("TimeZoneId"); + + b.Property("VerbosePermissions"); + + b.Property("VoicePlusTextEnabled"); + + b.Property("WarningsInitialized"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.HasIndex("LogSettingId"); + + b.HasIndex("RootPermissionId"); + + b.ToTable("GuildConfigs"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Interval"); + + b.Property("Message"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GuildRepeater"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredLogChannels"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredVoicePresenceCHannels"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelCreated"); + + b.Property("ChannelCreatedId"); + + b.Property("ChannelDestroyed"); + + b.Property("ChannelDestroyedId"); + + b.Property("ChannelId"); + + b.Property("ChannelUpdated"); + + b.Property("ChannelUpdatedId"); + + b.Property("DateAdded"); + + b.Property("IsLogging"); + + b.Property("LogOtherId"); + + b.Property("LogUserPresence"); + + b.Property("LogUserPresenceId"); + + b.Property("LogVoicePresence"); + + b.Property("LogVoicePresenceId"); + + b.Property("LogVoicePresenceTTSId"); + + b.Property("MessageDeleted"); + + b.Property("MessageDeletedId"); + + b.Property("MessageUpdated"); + + b.Property("MessageUpdatedId"); + + b.Property("UserBanned"); + + b.Property("UserBannedId"); + + b.Property("UserJoined"); + + b.Property("UserJoinedId"); + + b.Property("UserLeft"); + + b.Property("UserLeftId"); + + b.Property("UserMutedId"); + + b.Property("UserPresenceChannelId"); + + b.Property("UserUnbanned"); + + b.Property("UserUnbannedId"); + + b.Property("UserUpdated"); + + b.Property("UserUpdatedId"); + + b.Property("VoicePresenceChannelId"); + + b.HasKey("Id"); + + b.ToTable("LogSettings"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("ModuleName"); + + b.Property("Prefix"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("ModulePrefixes"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("MutedUserId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NextId"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("NextId") + .IsUnique(); + + b.ToTable("Permission"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("Permissionv2"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("PlayingStatus"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("MusicPlaylistId"); + + b.Property("Provider"); + + b.Property("ProviderType"); + + b.Property("Query"); + + b.Property("Title"); + + b.Property("Uri"); + + b.HasKey("Id"); + + b.HasIndex("MusicPlaylistId"); + + b.ToTable("PlaylistSong"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("AuthorName") + .IsRequired(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("Keyword") + .IsRequired(); + + b.Property("Text") + .IsRequired(); + + b.HasKey("Id"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Icon"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("RaceAnimals"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("IsPrivate"); + + b.Property("Message"); + + b.Property("ServerId"); + + b.Property("UserId"); + + b.Property("When"); + + b.HasKey("Id"); + + b.ToTable("Reminders"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AmountRewardedThisMonth"); + + b.Property("DateAdded"); + + b.Property("LastReward"); + + b.Property("PatreonUserId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("RewardedUsers"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("Name"); + + b.Property("Price"); + + b.Property("RoleId"); + + b.Property("RoleName"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("ShopEntry"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ShopEntryId"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("ShopEntryId"); + + b.ToTable("ShopEntryItem"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredRole"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredUser"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("ChannelId"); + + b.Property("ChannelName"); + + b.Property("CommandText"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("GuildName"); + + b.Property("Index"); + + b.Property("VoiceChannelId"); + + b.Property("VoiceChannelName"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("StartupCommand"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UnmuteAt"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnmuteTimer"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.Property("type"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("PokeGame"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.Property("VoiceChannelId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("VcRoleInfo"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AffinityId"); + + b.Property("ClaimerId"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.Property("WaifuId"); + + b.HasKey("Id"); + + b.HasIndex("AffinityId"); + + b.HasIndex("ClaimerId"); + + b.HasIndex("WaifuId") + .IsUnique(); + + b.ToTable("WaifuInfo"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NewId"); + + b.Property("OldId"); + + b.Property("UpdateType"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("NewId"); + + b.HasIndex("OldId"); + + b.HasIndex("UserId"); + + b.ToTable("WaifuUpdates"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Forgiven"); + + b.Property("ForgivenBy"); + + b.Property("GuildId"); + + b.Property("Moderator"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("Warnings"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Count"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Punishment"); + + b.Property("Time"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("WarningPunishment"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("Blacklist") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("BlockedCommands") + .HasForeignKey("BotConfigId"); + + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("BlockedModules") + .HasForeignKey("BotConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + { + b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + .WithMany("Bases") + .HasForeignKey("ClashWarId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("CommandPrices") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("EightBallResponses") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId"); + + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + { + b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId"); + + b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + .WithMany() + .HasForeignKey("RootPermissionId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("GuildRepeaters") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + { + b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredVoicePresenceChannelIds") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("ModulePrefixes") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + { + b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + .WithOne("Previous") + .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("Permissions") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("RotatingStatusMessages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("RaceAnimals") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + .WithMany("Items") + .HasForeignKey("ShopEntryId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("StartupCommands") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId"); + }); + } + } +} diff --git a/src/NadekoBot/Migrations/20170501103455_patreon-id.cs b/src/NadekoBot/Migrations/20170501103455_patreon-id.cs new file mode 100644 index 00000000..f7a9a784 --- /dev/null +++ b/src/NadekoBot/Migrations/20170501103455_patreon-id.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace NadekoBot.Migrations +{ + public partial class patreonid : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "PatreonUserId", + table: "RewardedUsers", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "PatreonUserId", + table: "RewardedUsers"); + } + } +} diff --git a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs index 2e1fd50c..80a2fadb 100644 --- a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -966,6 +966,8 @@ namespace NadekoBot.Migrations b.Property("LastReward"); + b.Property("PatreonUserId"); + b.Property("UserId"); b.HasKey("Id"); diff --git a/src/NadekoBot/Modules/Utility/Commands/PatreonCommands.cs b/src/NadekoBot/Modules/Utility/Commands/PatreonCommands.cs index 618fb588..9db51b46 100644 --- a/src/NadekoBot/Modules/Utility/Commands/PatreonCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/PatreonCommands.cs @@ -173,13 +173,14 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.UnitOfWork()) { var users = uow._context.Set(); - var usr = users.FirstOrDefault(x => x.UserId == userId); + var usr = users.FirstOrDefault(x => x.PatreonUserId == data.User.id); if (usr == null) { users.Add(new RewardedUser() { UserId = userId, + PatreonUserId = data.User.id, LastReward = now, AmountRewardedThisMonth = amount, }); @@ -194,6 +195,7 @@ namespace NadekoBot.Modules.Utility { usr.LastReward = now; usr.AmountRewardedThisMonth = amount; + usr.PatreonUserId = data.User.id; await CurrencyHandler.AddCurrencyAsync(userId, "Patreon reward - recurring", amount, uow).ConfigureAwait(false); @@ -207,6 +209,7 @@ namespace NadekoBot.Modules.Utility usr.LastReward = now; usr.AmountRewardedThisMonth = amount; + usr.PatreonUserId = data.User.id; await CurrencyHandler.AddCurrencyAsync(usr.UserId, "Patreon reward - update", toAward, uow).ConfigureAwait(false); diff --git a/src/NadekoBot/Services/Database/Models/RewardedUser.cs b/src/NadekoBot/Services/Database/Models/RewardedUser.cs index f7db8dc4..f40e083f 100644 --- a/src/NadekoBot/Services/Database/Models/RewardedUser.cs +++ b/src/NadekoBot/Services/Database/Models/RewardedUser.cs @@ -5,6 +5,7 @@ namespace NadekoBot.Services.Database.Models public class RewardedUser : DbEntity { public ulong UserId { get; set; } + public string PatreonUserId { get; set; } public int AmountRewardedThisMonth { get; set; } public DateTime LastReward { get; set; } }