https für Cleverbot

This commit is contained in:
Akamaru 2015-12-07 19:43:04 +01:00
parent b50b000fd3
commit b8a220685a

View File

@ -2,8 +2,8 @@ do
function run(msg, matches)
local text = msg.text
local url = "http://nocf.andibi.tk/dl/chatter-bot-api/cleverbot.php?text="..URL.escape(text)
local query = http.request(url)
local url = "https://andibi.tk/dl/chatter-bot-api/cleverbot.php?text="..URL.escape(text)
local query = https.request(url)
if query == nil then return 'Ein Fehler ist aufgetreten :(' end
local decode = json:decode(query)
local answer = string.gsub(decode.clever, "Ä", "Ä")