From 9be2fe5d4b0cc53275f1ece2c51991c5ba521033 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 14 Apr 2016 11:20:46 +0200 Subject: Implemented new methods added in Bot API 2.0 The new parameter mode of the `editMessage*` methods where one parameter of a set of parameters is required is currently not supported by `wrap-api-method`. --- README.md | 8 ++++++++ telebot.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/README.md b/README.md index 24e12dc..7cf8a41 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,17 @@ Based on the official [documentation](https://core.telegram.org/bots/api#availab * sendVideo * sendVoice * sendLocation +* sendVenue +* sendContact * sendChatAction * getUserProfilePhotos * getFile +* kickChatMember +* unbanChatMember +* answerCallbackQuery +* editMessageText +* editMessageCaption +* editMessageReplyMarkup * answerInlineQuery The only missing method is `setWebhook` as this kind of interfacing with _Telegram_ is currently out of scope of this library. Should this be required an appropriate wrapper may be easily generated using the `wrap-api-method` macro described by the module. diff --git a/telebot.scm b/telebot.scm index b5ca1e3..34fc466 100644 --- a/telebot.scm +++ b/telebot.scm @@ -10,9 +10,17 @@ sendVideo sendVoice sendLocation + sendVenue + sendContact sendChatAction getUserProfilePhotos getFile + kickChatMember + unbanChatMember + answerCallbackQuery + editMessageText + editMessageCaption + editMessageReplyMarkup answerInlineQuery ;;; framework is-message? @@ -153,6 +161,26 @@ reply_to_message_id reply_markup)) + (wrap-api-method sendVenue + (required chat_id + latitude + longitude + title + address) + (optional foursquare_id + disable_notification + reply_to_message_id + reply_markup)) + + (wrap-api-method sendContact + (required chat_id + phone_number + first_name) + (optional last_name + disable_notification + reply_to_message_id + reply_markup)) + (wrap-api-method sendChatAction (required chat_id action) @@ -167,6 +195,45 @@ (required file_id) (optional)) + (wrap-api-method kickChatMember + (required chat_id + user_id) + (optional)) + + (wrap-api-method unbanChatMember + (required chat_id + user_id) + (optional)) + + (wrap-api-method answerCallbackQuery + (required callback_query_id) + (optional text + show_alert)) + + (wrap-api-method editMessageText + (required text) + (optional chat_id + message_id + inline_message_id + parse_mode + disable_web_page_preview + reply_markup)) + + (wrap-api-method editMessageCaption + (required) + (optional chat_id + message_id + inline_message_id + caption + reply_markup)) + + (wrap-api-method editMessageReplyMarkup + (required) + (optional chat_id + message_id + inline_message_id + reply_markup)) + (wrap-api-method answerInlineQuery (required inline_query_id results) -- cgit v1.2.3