From 0383799ed94bb17d651bcb34914db157a5f5f905 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Sat, 9 Jul 2016 14:19:42 +0200 Subject: [PATCH] =?UTF-8?q?Wikipedia:=20InlineKeyboard=20f=C3=BCr=20Artike?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/plugins/wikipedia.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/otouto/plugins/wikipedia.lua b/otouto/plugins/wikipedia.lua index 87d5501..daecd42 100644 --- a/otouto/plugins/wikipedia.lua +++ b/otouto/plugins/wikipedia.lua @@ -126,7 +126,7 @@ function wikipedia:wikintro(text, lang) local lang = lang or "de" local title = page.title local title_enc = URL.escape(title) - return '*'..title.."*:\n"..utilities.md_escape(page.extract).."\n[Auf Wikipedia ansehen](https://"..lang..".wikipedia.org/wiki/"..title_enc..")" + return '*'..title.."*:\n"..utilities.md_escape(page.extract), '{"inline_keyboard":[[{"text":"Artikel aufrufen","url":"https://'..lang..'.wikipedia.org/wiki/'..title_enc..'"}]]}' else local text = text.." nicht gefunden" return text @@ -180,9 +180,9 @@ function wikipedia:action(msg, config, matches) if search then result = wikipedia:wikisearch(term, lang) else - result = wikipedia:wikintro(term, lang) + result, keyboard = wikipedia:wikintro(term, lang) end - utilities.send_reply(self, msg, result, true) + utilities.send_reply(self, msg, result, true, keyboard) end return wikipedia