aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-04-14 11:20:46 +0200
committerAdrian Kummerlaender2016-04-14 11:20:46 +0200
commit9be2fe5d4b0cc53275f1ece2c51991c5ba521033 (patch)
treee10c7607c71dd9f1ae31e40dbd90c546412c3ca2
parent453f7779786962c86edd02466f02ba4a4acdf301 (diff)
downloadTelebot-9be2fe5d4b0cc53275f1ece2c51991c5ba521033.tar
Telebot-9be2fe5d4b0cc53275f1ece2c51991c5ba521033.tar.gz
Telebot-9be2fe5d4b0cc53275f1ece2c51991c5ba521033.tar.bz2
Telebot-9be2fe5d4b0cc53275f1ece2c51991c5ba521033.tar.lz
Telebot-9be2fe5d4b0cc53275f1ece2c51991c5ba521033.tar.xz
Telebot-9be2fe5d4b0cc53275f1ece2c51991c5ba521033.tar.zst
Telebot-9be2fe5d4b0cc53275f1ece2c51991c5ba521033.zip
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`.
-rw-r--r--README.md8
-rw-r--r--telebot.scm67
2 files changed, 75 insertions, 0 deletions
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)