From 9e79f6822fb4e47262832c07e1e7a2f9a181c18e Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 24 Apr 2016 13:26:16 +0200 Subject: [PATCH] e621 search is now async --- NadekoBot/Classes/SearchHelper.cs | 4 +--- commandlist.md | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/NadekoBot/Classes/SearchHelper.cs b/NadekoBot/Classes/SearchHelper.cs index 794637e6..adf094a1 100644 --- a/NadekoBot/Classes/SearchHelper.cs +++ b/NadekoBot/Classes/SearchHelper.cs @@ -263,9 +263,7 @@ namespace NadekoBot.Classes { try { - ServicePointManager.Expect100Continue = true; - ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; - XDocument doc = XDocument.Load(" https://e621.net/post/index.xml?tags="+Uri.EscapeUriString(tags)+"%20order:random&limit=1"); + XDocument doc = await Task.Run(() => XDocument.Load(" http://e621.net/post/index.xml?tags=" + Uri.EscapeUriString(tags) + "%20order:random&limit=1")); int id = Convert.ToInt32(doc.Root.Element("post").Element("id").Value); return (doc.Root.Element("post").Element("file_url").Value); } diff --git a/commandlist.md b/commandlist.md index cac5f946..6e598e1f 100644 --- a/commandlist.md +++ b/commandlist.md @@ -2,7 +2,7 @@ ######You can donate on paypal: `nadekodiscordbot@gmail.com` or Bitcoin `17MZz1JAqME39akMLrVT4XBPffQJ2n1EPa` #NadekoBot List Of Commands -Version: `NadekoBot v0.9.5950.11393` +Version: `NadekoBot v0.9.5957.32647` ### Administration Command and aliases | Description | Usage ----------------|--------------|------- @@ -74,7 +74,8 @@ Command and aliases | Description | Usage `.unstuck` | Clears the message queue. **Owner Only!** `.donators` | List of lovely people who donated to keep this project alive. `.adddon`, `.donadd` | Add a donator to the database. -`.videocall` | Creates a private appear.in video call link for you and other mentioned people. The link is sent to mentioned people via a private message. +`.videocall` | Creates a private video call link for you and other mentioned people. The link is sent to mentioned people via a private message. +`.announce` | Sends a message to all servers' general channel bot is connected to.**Owner Only!** | .announce Useless spam ### Help Command and aliases | Description | Usage