From d0a5ae1f62945c45e67a12d1c8d4a6fa93262593 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 10 Mar 2016 14:28:31 +0100 Subject: Implement `forwardMessage` --- telebot.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/telebot.scm b/telebot.scm index 6d6792d..0a24973 100644 --- a/telebot.scm +++ b/telebot.scm @@ -19,9 +19,16 @@ #f read-json)) - (define (send-message token user message) + (define (send-message token chat-id text) (with-input-from-request (get-query-url token "sendMessage") - (list (cons 'chat_id user) - (cons 'text message)) + (list (cons 'chat_id chat-id) + (cons 'text text)) + read-json)) + + (define (forward-message token chat-id from-chat-id message-id) + (with-input-from-request (get-query-url token "forwardMessage") + (list (cons 'chat_id chat-id) + (cons 'from_chat_id from-chat-id) + (cons 'message_id message-id)) read-json)) ) -- cgit v1.2.3