diff --git a/otouto/bot.lua b/otouto/bot.lua index 6ec117e..9378400 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -94,7 +94,9 @@ function bot:run(config) if res then for _,v in ipairs(res.result) do -- Go through every new message. self.last_update = v.update_id - if v.message then + if v.callback_query then + print('callback_query wird noch nicht unterstützt! Erhaltener Wert: '..v.callback_query.data) + elseif v.message then bot.on_msg_receive(self, v.message, config) end end diff --git a/otouto/utilities.lua b/otouto/utilities.lua index 9c71f66..62ed9f4 100644 --- a/otouto/utilities.lua +++ b/otouto/utilities.lua @@ -16,13 +16,14 @@ local mimetype = (loadfile "./otouto/mimetype.lua")() -- For the sake of ease to new contributors and familiarity to old contributors, -- we'll provide a couple of aliases to real bindings here. -function utilities:send_message(chat_id, text, disable_web_page_preview, reply_to_message_id, use_markdown) +function utilities:send_message(chat_id, text, disable_web_page_preview, reply_to_message_id, use_markdown, reply_markup) return bindings.request(self, 'sendMessage', { chat_id = chat_id, text = text, disable_web_page_preview = disable_web_page_preview, reply_to_message_id = reply_to_message_id, - parse_mode = use_markdown and 'Markdown' or nil + parse_mode = use_markdown and 'Markdown' or nil, + reply_markup = reply_markup } ) end