From 8c747a27d739168d5151c0f1022458c567fae211 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Sun, 14 Aug 2016 00:47:18 +0200 Subject: [PATCH] =?UTF-8?q?Cleverbot:=20send=5Ftyping()=20und=20zus=C3=A4t?= =?UTF-8?q?zliches=20Pattern:=20^Brawlbot,=20(.+)$"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/plugins/cleverbot.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/otouto/plugins/cleverbot.lua b/otouto/plugins/cleverbot.lua index 4f298a6..be8e157 100644 --- a/otouto/plugins/cleverbot.lua +++ b/otouto/plugins/cleverbot.lua @@ -2,7 +2,8 @@ local cleverbot = {} function cleverbot:init(config) cleverbot.triggers = { - "^/cbot (.*)$" + "^/cbot (.+)$", + "^[Bb]rawlbot, (.+)$", } cleverbot.doc = [[* @@ -14,6 +15,7 @@ cleverbot.command = 'cbot ' function cleverbot:action(msg, config) local text = msg.text local url = "https://brawlbot.tk/apis/chatter-bot-api/cleverbot.php?text="..URL.escape(text) + utilities.send_typing(self, msg.chat.id, 'typing') local query = https.request(url) if query == nil then utilities.send_reply(self, msg, 'Ein Fehler ist aufgetreten :(') return end local decode = json.decode(query)