cleverbot change for public bot, role changes now show time
This commit is contained in:
		@@ -293,7 +293,7 @@ namespace NadekoBot.Modules.Administration
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    else
 | 
					                    else
 | 
				
			||||||
                        return;
 | 
					                        return;
 | 
				
			||||||
                    try { await logChannel.SendMessageAsync("🕔`{prettyCurrentTime}` " + str).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); }
 | 
					                    try { await logChannel.SendMessageAsync($"🕔`{prettyCurrentTime}` " + str).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                catch (Exception ex) { _log.Warn(ex); }
 | 
					                catch (Exception ex) { _log.Warn(ex); }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,10 +29,16 @@ namespace Services.CleverBotApi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        public static ChatterBot Create(ChatterBotType type, object arg)
 | 
					        public static ChatterBot Create(ChatterBotType type, object arg)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					#if GLOBAL_NADEKO
 | 
				
			||||||
 | 
					            var url = "http://www.cleverbot.com/webservicemin?uc=321&botapi=nadekobot";
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					            var url = "http://www.cleverbot.com/webservicemin?uc=321";
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            switch (type)
 | 
					            switch (type)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                case ChatterBotType.CLEVERBOT:
 | 
					                case ChatterBotType.CLEVERBOT:
 | 
				
			||||||
                    return new Cleverbot("http://www.cleverbot.com/", "http://www.cleverbot.com/webservicemin?uc=321", 26);
 | 
					                    return new Cleverbot("http://www.cleverbot.com/", url, 26);
 | 
				
			||||||
                case ChatterBotType.JABBERWACKY:
 | 
					                case ChatterBotType.JABBERWACKY:
 | 
				
			||||||
                    return new Cleverbot("http://jabberwacky.com", "http://jabberwacky.com/webservicemin", 20);
 | 
					                    return new Cleverbot("http://jabberwacky.com", "http://jabberwacky.com/webservicemin", 20);
 | 
				
			||||||
                case ChatterBotType.PANDORABOTS:
 | 
					                case ChatterBotType.PANDORABOTS:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,7 +46,7 @@ namespace Services.CleverBotApi
 | 
				
			|||||||
        private readonly int endIndex;
 | 
					        private readonly int endIndex;
 | 
				
			||||||
        private readonly string url;
 | 
					        private readonly string url;
 | 
				
			||||||
        private readonly IDictionary<string, string> vars;
 | 
					        private readonly IDictionary<string, string> vars;
 | 
				
			||||||
		private readonly CookieCollection cookies;
 | 
					        private readonly CookieCollection cookies;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public CleverbotSession(string baseUrl, string url, int endIndex)
 | 
					        public CleverbotSession(string baseUrl, string url, int endIndex)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -60,7 +60,7 @@ namespace Services.CleverBotApi
 | 
				
			|||||||
            //vars["fno"] = "0";
 | 
					            //vars["fno"] = "0";
 | 
				
			||||||
            //vars["sub"] = "Say";
 | 
					            //vars["sub"] = "Say";
 | 
				
			||||||
            //vars["cleanslate"] = "false";
 | 
					            //vars["cleanslate"] = "false";
 | 
				
			||||||
			cookies = Utils.GetCookies(baseUrl);
 | 
					            cookies = Utils.GetCookies(baseUrl);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public async Task<ChatterBotThought> Think(ChatterBotThought thought)
 | 
					        public async Task<ChatterBotThought> Think(ChatterBotThought thought)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user