From 38d06908469e8af10eb3ccde02d3b92b4e7df621 Mon Sep 17 00:00:00 2001 From: samvaio Date: Sun, 23 Oct 2016 21:48:53 +0530 Subject: [PATCH 01/24] Little improvement, thanks to @fearnlj01#3535 --- docs/guides/OSX Guide.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index a475592a..0994ee1e 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -7,7 +7,7 @@ ####Installing Homebrew -`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` +```/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"``` Run `brew update` to fetch the latest package data. @@ -26,14 +26,17 @@ brew install tmux ``` ####Installing .NET Core SDK + - `ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/` - `ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/` - Download the .NET Core SDK, found [here.](https://go.microsoft.com/fwlink/?LinkID=827526) - Open the `.pkg` file you downloaded and install it. +- `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin` +- `dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json` ####Check your `FFMPEG` -**In case your `FFMPEG` wasnt installed properly** +**In case your `FFMPEG` wasnt installed properly (Optional)** - `brew options ffmpeg` - `brew install ffmpeg --with-x --with-y --with-z` etc. @@ -43,6 +46,7 @@ brew install tmux - Then try `brew install ffmpeg` again. ####Installing xcode-select + Xcode command line tools. You will do this in Terminal.app by running the following command line: `xcode-select --install` @@ -52,9 +56,10 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst ####Downloading and building Nadeko - `cd ~` - `git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git` -- `cd ~/NadekoBot/` +- `cd ~/NadekoBot/discord.net` - `dotnet restore` - `cd ~/NadekoBot/src/NadekoBot/` +- `dotnet restore` - `dotnet build --configuration Release` ####Creating DiscordBot application @@ -82,23 +87,27 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst - 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. ####Running NadekoBot - + +-Using tmux + `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)`. -or if you want to use Screen, run: +-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: + `cd ~/NadekoBot/src/NadekoBot/` -- Start Nadeko using dotnet: - `dotnet run --configuration Release` CHECK THE BOT IN DISCORD, IF EVERYTHING IS WORKING @@ -142,4 +151,4 @@ Nadeko is really easy to update as of version 1.0! just copy and paste the comma [Atom]: https://atom.io/ [Invite Guide]: http://discord.kongslien.net/guide.html [Google Console]: https://console.developers.google.com -[Soundcloud]: https://soundcloud.com/you/apps/new \ No newline at end of file +[Soundcloud]: https://soundcloud.com/you/apps/new From bf4d4c700827860cf91b8cb2e2aec69154601f3d Mon Sep 17 00:00:00 2001 From: samvaio Date: Sun, 23 Oct 2016 21:50:17 +0530 Subject: [PATCH 02/24] Little improvement, thanks to @fearnlj01#3535 --- docs/guides/OSX Guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index 0994ee1e..a92395b7 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -88,14 +88,14 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst ####Running NadekoBot --Using tmux +- Using tmux `tmux new -s nadeko` ^this will create a new session named “nadeko” `(you can replace “nadeko” with anything you prefer and remember its your session name)`. --Using Screen +- Using Screen If you want to use Screen, run: From 3ffa801bbdc606aa148ddbadb7b03f6cab0ad20c Mon Sep 17 00:00:00 2001 From: samvaio Date: Sun, 23 Oct 2016 22:16:48 +0530 Subject: [PATCH 03/24] More changes --- docs/guides/OSX Guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index a92395b7..23b0df53 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -72,7 +72,7 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst - Keep this window open for now. ####Setting up Credentials.json file -- Open up the `NadekoBot` folder, which should be in your home directory, then the `src` folder and then the additonal `NadekoBot` folder. +- Open up the `NadekoBot` folder, which should be in your home directory, then `NadekoBot` folder then `src` folder and then the additonal `NadekoBot` folder. - In our `NadekoBot` folder you should have `.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 your Text editor. @@ -121,7 +121,7 @@ Now time to move bot to background and to do that, press CTRL+B+D (this will dit - Copy your `Client ID` from your [Discord bot applications page.][DiscordApp] - Replace the `12345678` in this link `https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303` with your `Client ID`. - Your edited link should look like this: `https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID**&scope=bot&permissions=66186303`. -- Go to newly created link and pick the server we created, and click `Authorize`. +- Go to newly created link and pick the server, and click `Authorize`. - Bot should be added to your server. ####Setting NadekoBot Music From 5c1525c9564b1614d43978250dcf91bbb765b37e Mon Sep 17 00:00:00 2001 From: samvaio Date: Sun, 23 Oct 2016 23:18:30 +0530 Subject: [PATCH 04/24] Little more changes --- docs/guides/OSX Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index 23b0df53..65e48643 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -32,7 +32,6 @@ brew install tmux - Download the .NET Core SDK, found [here.](https://go.microsoft.com/fwlink/?LinkID=827526) - Open the `.pkg` file you downloaded and install it. - `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin` -- `dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json` ####Check your `FFMPEG` @@ -57,6 +56,7 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst - `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` From 2ad34ccd0db43613e3f66c27937291ee3f8ed293 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 24 Oct 2016 05:09:26 +0530 Subject: [PATCH 05/24] =?UTF-8?q?Add=20Kwoth's=20Magic=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guides/OSX Guide.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index 65e48643..f22885cf 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -53,6 +53,14 @@ 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 + +**METHOD I** +- `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` @@ -112,7 +120,7 @@ If you want to use Screen, run: CHECK THE BOT IN DISCORD, IF EVERYTHING IS WORKING -Now time to move bot to background and to do that, press CTRL+B+D (this will ditach the nadeko session using TMUX) +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)* From e05aca0e83b77f7538928aa2409724e3ca5bb050 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 24 Oct 2016 05:32:11 +0530 Subject: [PATCH 06/24] =?UTF-8?q?More=20Magic=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guides/Linux Guide.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 87775703..adf3e9c6 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -97,12 +97,26 @@ sudo apt-get update && sudo apt-get install ffmpeg -y` ####Getting NadekoBot **10)** +`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 below steps again.* + +**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` ####Setting up NadekoBot @@ -130,8 +144,7 @@ sudo apt-get update && sudo apt-get install ffmpeg -y` Go back to **PuTTY**, `(hope its still running xD)` **12)** -Type/ Copy and hit **Enter**. - +(Type or Copy and hit **Enter**) `tmux new -s nadeko` `cd NadekoBot/src/NadekoBot/` **^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. From 1e6ef2a7b4d79e050c86ca3e4d159bf42016cc2a Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 24 Oct 2016 05:39:27 +0530 Subject: [PATCH 07/24] Update Linux Guide.md --- docs/guides/Linux Guide.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index adf3e9c6..672dbd16 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -97,8 +97,8 @@ sudo apt-get update && sudo apt-get install ffmpeg -y` ####Getting NadekoBot **10)** -`cd ~` -`curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh` +```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 below steps again.* **10.5)** @@ -111,12 +111,12 @@ sudo apt-get update && sudo apt-get install ffmpeg -y` *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` +```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 From cac89bf54e5d9c29276cc5200078d13750b1cce7 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 24 Oct 2016 05:41:04 +0530 Subject: [PATCH 08/24] Added few changes --- docs/guides/Linux Guide.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 672dbd16..89aff79f 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -144,7 +144,6 @@ dotnet build --configuration Release``` Go back to **PuTTY**, `(hope its still running xD)` **12)** -(Type or Copy and hit **Enter**) `tmux new -s nadeko` `cd NadekoBot/src/NadekoBot/` **^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. From 3c0829e40aa99c356ef95bb981849cb86958dad0 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 24 Oct 2016 05:48:49 +0530 Subject: [PATCH 09/24] Additions and Kwoth's Magic from Magical Girl Mirai Okay sorry for spamming pull requestm this will be the last one, off to bed Sam --- docs/guides/Linux Guide.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 89aff79f..7cb3049d 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -97,26 +97,26 @@ sudo apt-get update && sudo apt-get install ffmpeg -y` ####Getting NadekoBot **10)** -```cd ~ -curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh``` +- `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 below steps again.* **10.5)** -`cd ~ && git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git` +- `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` +- `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``` +- `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 From 51496fa51781771b19014383c25dc9750e144a63 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 07:57:26 +0200 Subject: [PATCH 10/24] Fixed chinese in ~trans --- src/NadekoBot/Modules/Searches/Commands/GoogleTranslator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/GoogleTranslator.cs b/src/NadekoBot/Modules/Searches/Commands/GoogleTranslator.cs index 769d2a80..be415465 100644 --- a/src/NadekoBot/Modules/Searches/Commands/GoogleTranslator.cs +++ b/src/NadekoBot/Modules/Searches/Commands/GoogleTranslator.cs @@ -94,8 +94,8 @@ namespace NadekoBot.Modules.Searches { "bn", "bn"}, { "bg", "bg"}, { "ca", "ca"}, - { "zh-TW", "zh-TW"}, - { "zh-CN", "zh-CN"}, + { "zh-tw", "zh-TW"}, + { "zh-cn", "zh-CN"}, { "hr", "hr"}, { "cs", "cs"}, { "da", "da"}, From d34a429c1c4bce0a12f1e81730cb723fc43969b3 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 07:58:18 +0200 Subject: [PATCH 11/24] Remind fixed --- .../Modules/Utility/Commands/Remind.cs | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index f61aaeed..4523269d 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -93,28 +93,36 @@ namespace NadekoBot.Modules.Utility } } + public enum MeOrHere + { + Me,Here + } + [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public async Task Remind(IUserMessage umsg, string meorchannel, string timeStr, [Remainder] string message) + [Priority(1)] + public async Task Remind(IUserMessage umsg, MeOrHere meorhere, string timeStr, [Remainder] string message) { var channel = (ITextChannel)umsg.Channel; - var meorchStr = meorchannel.ToUpperInvariant(); - IMessageChannel ch; - bool isPrivate = false; - if (meorchStr == "ME") + IMessageChannel target; + if (meorhere == MeOrHere.Me) { - isPrivate = true; - ch = await ((IGuildUser)umsg.Author).CreateDMChannelAsync().ConfigureAwait(false); - } - else if (meorchStr == "HERE") - { - ch = channel; + target = await ((IGuildUser)umsg.Author).CreateDMChannelAsync().ConfigureAwait(false); } else { - ch = channel.Guild.GetTextChannels().FirstOrDefault(c => c.Name.ToUpperInvariant() == meorchStr || c.Id.ToString() == meorchStr); + target = channel; } + await Remind(umsg, target, timeStr, message).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(0)] + public async Task Remind(IUserMessage umsg, IMessageChannel ch, string timeStr, [Remainder] string message) + { + var channel = (ITextChannel)umsg.Channel; if (ch == null) { @@ -168,7 +176,7 @@ namespace NadekoBot.Modules.Utility var rem = new Reminder { ChannelId = ch.Id, - IsPrivate = isPrivate, + IsPrivate = ch is IDMChannel, When = time, Message = message, UserId = umsg.Author.Id, @@ -184,7 +192,7 @@ namespace NadekoBot.Modules.Utility try { await channel.SendMessageAsync($"⏰ I will remind \"{(ch is ITextChannel ? ((ITextChannel)ch).Name : umsg.Author.Username)}\" to \"{message.SanitizeMentions()}\" in {output}. ({time:d.M.yyyy.} at {time:HH:mm})").ConfigureAwait(false); } catch { } await StartReminder(rem); } - + [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [OwnerOnly] From e3aef58b1f01702aab51bbe2e84a2b318cde4975 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 24 Oct 2016 12:27:44 +0530 Subject: [PATCH 12/24] =?UTF-8?q?Add=20Kwoth's=20Magic=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guides/OSX Guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guides/OSX Guide.md b/docs/guides/OSX Guide.md index f22885cf..1cc00805 100644 --- a/docs/guides/OSX Guide.md +++ b/docs/guides/OSX Guide.md @@ -55,12 +55,14 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst ####Downloading and building Nadeko **METHOD I** + - `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` From 7ce07b5542d4db52fb3005cf3ec69ce8ce7cdc52 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 24 Oct 2016 12:32:30 +0530 Subject: [PATCH 13/24] =?UTF-8?q?Additions=20and=20Kwoth's=20Magic=20?= =?UTF-8?q?=E2=9C=A8=20from=20Magical=20Girl=20Mirai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guides/Linux Guide.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 7cb3049d..143b88f9 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -97,20 +97,24 @@ sudo apt-get update && sudo apt-get install ffmpeg -y` ####Getting NadekoBot **10)** + - `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 below steps again.* +*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` @@ -145,11 +149,13 @@ Go back to **PuTTY**, `(hope its still running xD)` **12)** `tmux new -s nadeko` -`cd NadekoBot/src/NadekoBot/` + **^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)** -`dotnet run --configuration Release` + +- `cd NadekoBot/src/NadekoBot/` +- `dotnet run --configuration Release` **CHECK THE BOT IN DISCORD, IF EVERYTHING IS WORKING** From 5d542f3eaa44734b8cd1b7aff8a0b03e75a4d7e8 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 12:40:18 +0200 Subject: [PATCH 14/24] Updated bot version --- src/NadekoBot/NadekoBot.cs | 2 +- src/NadekoBot/Properties/AssemblyInfo.cs | 2 +- src/NadekoBot/Services/Impl/StatsService.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 6e5d5e03..a50dd94c 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -43,7 +43,7 @@ namespace NadekoBot SetupLogger(); _log = LogManager.GetCurrentClassLogger(); - _log.Info("Starting NadekoBot v" + typeof(NadekoBot).GetTypeInfo().Assembly.GetCustomAttribute().InformationalVersion); + _log.Info("Starting NadekoBot v" + StatsService.BotVersion); Credentials = new BotCredentials(); diff --git a/src/NadekoBot/Properties/AssemblyInfo.cs b/src/NadekoBot/Properties/AssemblyInfo.cs index 9a06963a..ca3bd293 100644 --- a/src/NadekoBot/Properties/AssemblyInfo.cs +++ b/src/NadekoBot/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NadekoBot")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyInformationalVersion("1.0-alpha")] +[assembly: AssemblyInformationalVersion("1.0")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index 61a27233..6a5c12c6 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -17,7 +17,7 @@ namespace NadekoBot.Services.Impl private DateTime started; private int commandsRan = 0; - public string BotVersion => "1.0-beta1"; + public const string BotVersion = "1.0-rc1"; public string Heap => Math.Round((double)GC.GetTotalMemory(false) / 1.MiB(), 2).ToString(); From a8d9575c15e06d0e5c5b9a6a73dc2a0e9dcc4c40 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 12:44:28 +0200 Subject: [PATCH 15/24] Betflip requires the minimum bet of 3, because return value is 1.8x now --- src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs index eaca0700..8a85f700 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs @@ -58,8 +58,12 @@ namespace NadekoBot.Modules.Gambling if (guessStr != "H" && guessStr != "T" && guessStr != "HEADS" && guessStr != "TAILS") return; - if (amount < 1) + if (amount < 3) + { + await channel.SendMessageAsync($"You can't bet less than 3{Gambling.CurrencySign}.") + .ConfigureAwait(false); return; + } // todo update this long userFlowers; using (var uow = DbHandler.UnitOfWork()) From fc5ebb7ae4eff6c2cee932cdc946e0d56d7828dd Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 13:52:27 +0200 Subject: [PATCH 16/24] SetMuteRole has manage roles permission requirement now --- src/NadekoBot/Modules/Administration/Administration.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 36bc957d..084888d0 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -407,6 +407,7 @@ namespace NadekoBot.Modules.Administration [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] + [RequirePermission(GuildPermission.ManageRoles)] [Priority(1)] public async Task SetMuteRole(IUserMessage imsg, [Remainder] string name) { From 2cafd17de99881195adde79183399605f6e4976d Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 13:53:01 +0200 Subject: [PATCH 17/24] SetMuteRole has manage roles permission requirement now x2 --- src/NadekoBot/Modules/Administration/Administration.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 084888d0..96e9d2cc 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -428,6 +428,7 @@ namespace NadekoBot.Modules.Administration [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] + [RequirePermission(GuildPermission.ManageRoles)] [Priority(0)] public Task SetMuteRole(IUserMessage imsg, [Remainder] IRole role) => SetMuteRole(imsg, role.Name); From 29b06567bd5935b29d2a0265382090f9c9c83159 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 13:59:16 +0200 Subject: [PATCH 18/24] You can .award to a role now, closes #681 --- src/NadekoBot/Modules/Gambling/Gambling.cs | 28 +++++++++++++++++-- .../Resources/CommandStrings.Designer.cs | 4 +-- src/NadekoBot/Resources/CommandStrings.resx | 6 ++-- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index ac57940d..7107ea41 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -102,23 +102,45 @@ namespace NadekoBot.Modules.Gambling [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [OwnerOnly] - public Task Award(IUserMessage umsg, long amount, [Remainder] IGuildUser usr) => + [Priority(2)] + public Task Award(IUserMessage umsg, int amount, [Remainder] IGuildUser usr) => Award(umsg, amount, usr.Id); [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [OwnerOnly] - public async Task Award(IUserMessage umsg, long amount, [Remainder] ulong usrId) + [Priority(1)] + public async Task Award(IUserMessage umsg, int amount, ulong usrId) { var channel = (ITextChannel)umsg.Channel; if (amount <= 0) return; - await CurrencyHandler.AddCurrencyAsync(usrId, $"Awarded by bot owner. ({umsg.Author.Username}/{umsg.Author.Id})", (int)amount).ConfigureAwait(false); + await CurrencyHandler.AddCurrencyAsync(usrId, $"Awarded by bot owner. ({umsg.Author.Username}/{umsg.Author.Id})", amount).ConfigureAwait(false); await channel.SendMessageAsync($"{umsg.Author.Mention} successfully awarded {amount} {(amount == 1 ? Gambling.CurrencyName : Gambling.CurrencyPluralName)} to <@{usrId}>!").ConfigureAwait(false); } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + [Priority(0)] + public async Task Award(IUserMessage umsg, int amount, [Remainder] IRole role) + { + var channel = (ITextChannel)umsg.Channel; + var users = channel.Guild.GetUsers() + .Where(u => u.Roles.Contains(role)) + .ToList(); + await Task.WhenAll(users.Select(u => CurrencyHandler.AddCurrencyAsync(u.Id, + $"Awarded by bot owner to **{role.Name}** role. ({umsg.Author.Username}/{umsg.Author.Id})", + amount))) + .ConfigureAwait(false); + + await channel.SendMessageAsync($"Awarded `{amount}` {Gambling.CurrencyPluralName} to `{users.Count}` users from `{role.Name}` role.") + .ConfigureAwait(false); + + } [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index d497209f..d85adb73 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -555,7 +555,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Awards someone a certain amount of currency. . + /// Looks up a localized string similar to Awards someone a certain amount of currency. You can also specify a role name to award currency to all users in a role.. /// public static string award_desc { get { @@ -564,7 +564,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `{0}award 100 @person`. + /// Looks up a localized string similar to `{0}award 100 @person` or `{0}award 5 Role Of Gamblers`. /// public static string award_usage { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index cd384176..0bd6477a 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -1246,10 +1246,10 @@ award - Awards someone a certain amount of currency. + Awards someone a certain amount of currency. You can also specify a role name to award currency to all users in a role. - `{0}award 100 @person` + `{0}award 100 @person` or `{0}award 5 Role Of Gamblers` take @@ -2511,4 +2511,4 @@ `{0}xkcd` or `{0}xkcd 1400` or `{0}xkcd latest` - + \ No newline at end of file From ee4d17c3d024557eec27364771a1df2e7d576226 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 14:17:17 +0200 Subject: [PATCH 19/24] added .togethertube command, #586 --- .../Modules/Utility/Commands/InfoCommands.cs | 18 +++++++++++++ .../Resources/CommandStrings.Designer.cs | 27 +++++++++++++++++++ src/NadekoBot/Resources/CommandStrings.resx | 9 +++++++ 3 files changed, 54 insertions(+) diff --git a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs index 5f65fa64..3304a28b 100644 --- a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs @@ -5,6 +5,7 @@ using NadekoBot.Attributes; using NadekoBot.Extensions; using System; using System.Linq; +using System.Net.Http; using System.Text; using System.Threading.Tasks; @@ -12,6 +13,23 @@ namespace NadekoBot.Modules.Utility { partial class Utility : DiscordModule { + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task TogetherTube(IUserMessage imsg) + { + var channel = (ITextChannel)imsg.Channel; + + Uri target; + using (var http = new HttpClient()) + { + var res = await http.GetAsync("https://togethertube.com/room/create").ConfigureAwait(false); + target = res.RequestMessage.RequestUri; + } + + await channel.SendMessageAsync($"{imsg.Author.Mention}, `Here is the link:` {target}") + .ConfigureAwait(false); + } + [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task ServerInfo(IUserMessage msg, string guild = null) diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index d85adb73..16a386c7 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -6350,6 +6350,33 @@ namespace NadekoBot.Resources { } } + /// + /// Looks up a localized string similar to togethertube totube. + /// + public static string togethertube_cmd { + get { + return ResourceManager.GetString("togethertube_cmd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creates a new room on <https://togethertube.com> and shows the link in the chat.. + /// + public static string togethertube_desc { + get { + return ResourceManager.GetString("togethertube_desc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to `{0}totube`. + /// + public static string togethertube_usage { + get { + return ResourceManager.GetString("togethertube_usage", resourceCulture); + } + } + /// /// Looks up a localized string similar to tq. /// diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 0bd6477a..652f489f 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -2511,4 +2511,13 @@ `{0}xkcd` or `{0}xkcd 1400` or `{0}xkcd latest` + + togethertube totube + + + Creates a new room on <https://togethertube.com> and shows the link in the chat. + + + `{0}totube` + \ No newline at end of file From 03399d58138f94c1b93174da1cf932316688b53b Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 15:59:34 +0200 Subject: [PATCH 20/24] ~place and ~placelist commands added #596 --- .../Searches/Commands/PlaceCommands.cs | 103 ++++++++++++++++++ .../Resources/CommandStrings.Designer.cs | 54 +++++++++ src/NadekoBot/Resources/CommandStrings.resx | 18 +++ 3 files changed, 175 insertions(+) create mode 100644 src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs diff --git a/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs new file mode 100644 index 00000000..9d84e5da --- /dev/null +++ b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs @@ -0,0 +1,103 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Attributes; +using NadekoBot.Services; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Searches +{ + public partial class Searches + { + [Group] + public class PlaceCommands + { + string typesStr { get; } = ""; + public PlaceCommands() + { + typesStr = $"`List of \"{NadekoBot.ModulePrefixes[typeof(Searches).Name]}place\" tags:`\n" + String.Join(", ", Enum.GetNames(typeof(PlaceType))); + } + + public enum PlaceType + { + Cage, //http://www.placecage.com + Steven, //http://www.stevensegallery.com + Beard, //http://placebeard.it + Img, //https://placeimg.com doesn't embed + Fill, //http://www.fillmurray.com + Bear, //https://www.placebear.com + Kitten, //http://placekitten.com + Bacon, //http://baconmockup.com + Xoart, //http://xoart.link + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Placelist(IUserMessage imsg) + { + var channel = (ITextChannel)imsg.Channel; + + await channel.SendMessageAsync(typesStr) + .ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Place(IUserMessage imsg, PlaceType placeType, uint width = 0, uint height = 0) + { + var channel = (ITextChannel)imsg.Channel; + + string url = ""; + switch (placeType) + { + case PlaceType.Cage: + url = "http://www.placecage.com"; + break; + case PlaceType.Steven: + url = "http://www.stevensegallery.com"; + break; + case PlaceType.Beard: + url = "http://placebeard.it"; + break; + case PlaceType.Img: + url = "https://placeimg.com"; + break; + case PlaceType.Fill: + url = "http://www.fillmurray.com"; + break; + case PlaceType.Bear: + url = "https://www.placebear.com"; + break; + case PlaceType.Kitten: + url = "http://placekitten.com"; + break; + case PlaceType.Bacon: + url = "http://baconmockup.com"; + break; + case PlaceType.Xoart: + url = "http://xoart.link"; + break; + } + var rng = new NadekoRandom(); + if (width <= 0 || width > 1000) + width = (uint)rng.Next(250, 850); + + if (height <= 0 || height > 1000) + height = (uint)rng.Next(250, 850); + + url += $"/{width}/{height}"; + + //using (var http = new HttpClient()) + //{ + // var res = await http.GetStreamAsync(url).ConfigureAwait(false); + // await channel.SendFileAsync() + //} + await channel.SendMessageAsync(url).ConfigureAwait(false); + } + } + } +} diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index 16a386c7..b3153042 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -4244,6 +4244,60 @@ namespace NadekoBot.Resources { } } + /// + /// Looks up a localized string similar to place. + /// + public static string place_cmd { + get { + return ResourceManager.GetString("place_cmd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shows a placeholder image of a given tag. Use `{0}placelist` to see all available tags. You can specify the width and height of the image as the last two optional arguments.. + /// + public static string place_desc { + get { + return ResourceManager.GetString("place_desc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to `{0}place Cage` or `{0}place steven 500 400`. + /// + public static string place_usage { + get { + return ResourceManager.GetString("place_usage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to placelist. + /// + public static string placelist_cmd { + get { + return ResourceManager.GetString("placelist_cmd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shows the list of available tags for the `{0}place` command.. + /// + public static string placelist_desc { + get { + return ResourceManager.GetString("placelist_desc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to `{0}placelist`. + /// + public static string placelist_usage { + get { + return ResourceManager.GetString("placelist_usage", resourceCulture); + } + } + /// /// Looks up a localized string similar to plant. /// diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 652f489f..9ad7965d 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -2511,6 +2511,24 @@ `{0}xkcd` or `{0}xkcd 1400` or `{0}xkcd latest` + + placelist + + + Shows the list of available tags for the `{0}place` command. + + + `{0}placelist` + + + place + + + Shows a placeholder image of a given tag. Use `{0}placelist` to see all available tags. You can specify the width and height of the image as the last two optional arguments. + + + `{0}place Cage` or `{0}place steven 500 400` + togethertube totube From 0db9acd26feffdd575dfce855deb5f10495a8975 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 16:50:02 +0200 Subject: [PATCH 21/24] .savechat shows username once again --- src/NadekoBot/Modules/Administration/Administration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 96e9d2cc..86522f30 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -858,7 +858,7 @@ namespace NadekoBot.Modules.Administration } var title = $"Chatlog-{channel.Guild.Name}/#{channel.Name}-{DateTime.Now}.txt"; await (umsg.Author as IGuildUser).SendFileAsync( - await JsonConvert.SerializeObject(new { Messages = msgs.Select(s => $"【{s.Timestamp:HH:mm:ss}】" + s.ToString()) }, Formatting.Indented).ToStream().ConfigureAwait(false), + await JsonConvert.SerializeObject(new { Messages = msgs.Select(s => $"【{s.Timestamp:HH:mm:ss}】{s.Author}:" + s.ToString()) }, Formatting.Indented).ToStream().ConfigureAwait(false), title, title).ConfigureAwait(false); } From 06d507662d8605922e9950acb56d73d8353ad20e Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 16:50:38 +0200 Subject: [PATCH 22/24] Trivia game fix error loop --- .../Modules/Games/Commands/Trivia/TriviaGame.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs b/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs index 7e53f791..dbc56b74 100644 --- a/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs +++ b/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs @@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Games.Trivia oldQuestions.Add(CurrentQuestion); //add it to exclusion list so it doesn't show up again //sendquestion try { await channel.SendMessageAsync($":question: **{CurrentQuestion.Question}**").ConfigureAwait(false); } - catch (HttpException ex) when (ex.StatusCode == System.Net.HttpStatusCode.Forbidden) + catch (HttpException ex) when (ex.StatusCode == System.Net.HttpStatusCode.NotFound || ex.StatusCode == System.Net.HttpStatusCode.Forbidden) { break; } @@ -80,7 +80,12 @@ namespace NadekoBot.Modules.Games.Trivia //hint await Task.Delay(HintTimeoutMiliseconds, token).ConfigureAwait(false); if (ShowHints) - try { await channel.SendMessageAsync($":exclamation:**Hint:** {CurrentQuestion.GetHint()}").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await channel.SendMessageAsync($":exclamation:**Hint:** {CurrentQuestion.GetHint()}").ConfigureAwait(false); } + catch (HttpException ex) when (ex.StatusCode == System.Net.HttpStatusCode.NotFound || ex.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + break; + } + catch (Exception ex) { _log.Warn(ex); } //timeout await Task.Delay(QuestionDurationMiliseconds - HintTimeoutMiliseconds, token).ConfigureAwait(false); @@ -150,7 +155,7 @@ namespace NadekoBot.Modules.Games.Trivia await channel.SendMessageAsync($":exclamation: We have a winner! It's {guildUser.Mention}.").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } - }); + }); return Task.CompletedTask; } From cec1c89e15ba47071f361e73377b67ef68ff874f Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 16:51:00 +0200 Subject: [PATCH 23/24] Img removed from ~place command, too slow --- src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs index 9d84e5da..822678ec 100644 --- a/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs @@ -27,7 +27,6 @@ namespace NadekoBot.Modules.Searches Cage, //http://www.placecage.com Steven, //http://www.stevensegallery.com Beard, //http://placebeard.it - Img, //https://placeimg.com doesn't embed Fill, //http://www.fillmurray.com Bear, //https://www.placebear.com Kitten, //http://placekitten.com From 19db9c6e46050090fa46a415ae1031347e360dbb Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 24 Oct 2016 16:51:26 +0200 Subject: [PATCH 24/24] woopsie --- src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs index 822678ec..61997efc 100644 --- a/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs @@ -62,9 +62,6 @@ namespace NadekoBot.Modules.Searches case PlaceType.Beard: url = "http://placebeard.it"; break; - case PlaceType.Img: - url = "https://placeimg.com"; - break; case PlaceType.Fill: url = "http://www.fillmurray.com"; break;